home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 August: Tool Chest / Dev.CD Aug 94.toast / Tool Chest / Networking & Communications / AppleTalk and PPP / draft-ietf-pppext-lcp-fs-02.txt next >
Encoding:
Text File  |  1994-06-24  |  103.2 KB  |  3,088 lines  |  [TEXT/MSWD]

  1.  
  2. Network Working Group                                W A Simpson, Editor
  3. Internet Draft                                                Daydreamer
  4. expires in six months                                           May 1994
  5.  
  6.  
  7.                    The Point-to-Point Protocol (PPP)
  8.                     draft-ietf-pppext-lcp-fs-02.txt
  9.  
  10.  
  11.  
  12. Status of this Memo
  13.  
  14.    This document is a submission to the Point-to-Point Protocol Working
  15.    Group of the Internet Engineering Task Force (IETF).  Comments should
  16.    be submitted to the ietf-ppp@merit.edu mailing list.
  17.  
  18.    Distribution of this memo is unlimited.
  19.  
  20.    Internet Drafts are working documents of the Internet Engineering
  21.    Task Force (IETF), its Areas, and its Working Groups.  Note that
  22.    other groups may also distribute working documents as Internet
  23.    Drafts.
  24.  
  25.    Internet Drafts are draft documents valid for a maximum of six
  26.    months.  Internet Drafts may be updated, replaced, or obsoleted by
  27.    other documents at any time.  It is not appropriate to use Internet
  28.    Drafts as reference material or to cite them other than as a
  29.    ``working draft'' or ``work in progress.''
  30.  
  31.    Please check the 1id-abstracts.txt listing contained in the
  32.    internet-drafts Shadow Directories on nic.ddn.mil, ds.internic.net,
  33.    venera.isi.edu, nic.nordu.net, or munnari.oz.au to learn the current
  34.    status of any Internet Draft.
  35.  
  36.  
  37. Abstract
  38.  
  39.    The Point-to-Point Protocol (PPP) provides a standard method for
  40.    transporting multi-protocol datagrams over point-to-point links.  PPP
  41.    is comprised of three main components:
  42.  
  43.       1. A method for encapsulating multi-protocol datagrams.
  44.  
  45.       2. A Link Control Protocol (LCP) for establishing, configuring,
  46.          and testing the data-link connection.
  47.  
  48.       3. A family of Network Control Protocols (NCPs) for establishing
  49.          and configuring different network-layer protocols.
  50.  
  51.  
  52.  
  53. Simpson                  expires in six months                  [Page i]
  54. DRAFT                   Point-to-Point Protocol                 May 1994
  55.  
  56.  
  57.    This document defines the PPP organization and methodology, and the
  58.    PPP encapsulation, together with an extensible option negotiation
  59.    mechanism which is able to negotiate a rich assortment of
  60.    configuration parameters and provides additional management
  61.    functions.  The PPP Link Control Protocol (LCP) is described in terms
  62.    of this mechanism.
  63.  
  64.  
  65. Summary of changes since Draft Standard
  66.  
  67.    [will be removed for RFC publication]
  68.  
  69.    Minor rewording and re-organization.  Introductory material copied
  70.    from requirements.
  71.  
  72.    A tlf is added to the FSA in state Starting on a Close event, in
  73.    response to 2 comments.  This results in an improvement in speed of
  74.    dropping a link when the response to the tls was delayed until after
  75.    an administrative Close.  Although, improving the speed seems
  76.    overkill to me, in those rare instances when your implementation is
  77.    slower than your administrator.  It does help the _peer_ not send
  78.    configure-requests, which potentially saves some resources in these
  79.    situations.  The previous FSA functioned correctly without this
  80.    addition, and the addition is upwardly compatible.  Hey, we want this
  81.    to be both perfect and optimal!
  82.  
  83.    MRU minus <number> replaced with a reference to the Length field.
  84.  
  85.    The requirement that "silently discarded" packets do not affect the
  86.    automaton is duplicated in more places, since a certain verbose
  87.    person hasn't read the specification carefully, and therefore it may
  88.    be a general problem.
  89.  
  90.    Some explanatory sections which had caused confusion have been
  91.    removed (because people implemented to the simplified explanation,
  92.    rather than the full text, despite explicit warnings).
  93.  
  94.    The non-required Max-Failure counter default is changed to 5.  This
  95.    restricts the time it takes for non-convergence.  Additional wording
  96.    makes more explicit how this applies to Naks.
  97.  
  98.    A Philosophy section added to the Configuration Options overview.
  99.  
  100.    Additional explanations in the Authentication phase, and the
  101.    authentication protocol option.  Similar text is added to link
  102.    quality protocol option.
  103.  
  104.    The ACCM is moved to the HDLC-like specification, in response to 3
  105.  
  106.  
  107.  
  108. Simpson                  expires in six months                 [Page ii]
  109. DRAFT                   Point-to-Point Protocol                 May 1994
  110.  
  111.  
  112.    comments that all the ACCM information should be in one place.
  113.  
  114.    The recommended options Appendix is moved to the HDLC-like draft.
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.  
  142.  
  143.  
  144.  
  145.  
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163. Simpson                  expires in six months                [Page iii]
  164. DRAFT                   Point-to-Point Protocol                 May 1994
  165.  
  166.  
  167. 1.  Introduction
  168.  
  169.    The Point-to-Point Protocol is designed for simple links which
  170.    transport packets between two peers.  These links provide full-duplex
  171.    simultaneous bi-directional operation, and are assumed to deliver
  172.    packets in order.  It is intended that PPP provide a common solution
  173.    for easy connection of a wide variety of hosts, bridges and routers
  174.    [1].
  175.  
  176.    Encapsulation
  177.  
  178.       The PPP encapsulation provides for multiplexing of different
  179.       network-layer protocols simultaneously over the same link.  The
  180.       PPP encapsulation has been carefully designed to retain
  181.       compatibility with most commonly used supporting hardware.
  182.  
  183.       Only 8 additional octets are necessary to form the encapsulation
  184.       when used within the default HDLC-like framing.  In environments
  185.       where bandwidth is at a premium, the encapsulation and framing may
  186.       be shortened to 2 or 4 octets.
  187.  
  188.       To support high speed implementations, the default encapsulation
  189.       uses only simple fields, only one of which needs to be examined
  190.       for demultiplexing.  The default header and information fields
  191.       fall on 32-bit boundaries, and the trailer may be padded to an
  192.       arbitrary boundary.
  193.  
  194.    Link Control Protocol
  195.  
  196.       In order to be sufficiently versatile to be portable to a wide
  197.       variety of environments, PPP provides a Link Control Protocol
  198.       (LCP).  The LCP is used to automatically agree upon the
  199.       encapsulation format options, handle varying limits on sizes of
  200.       packets, detect a looped-back link and other common
  201.       misconfiguration errors, and terminate the link.  Other optional
  202.       facilities provided are authentication of the identity of its peer
  203.       on the link, and determination when a link is functioning properly
  204.       and when it is failing.
  205.  
  206.    Network Control Protocols
  207.  
  208.       Point-to-Point links tend to exacerbate many problems with the
  209.       current family of network protocols.  For instance, assignment and
  210.       management of IP addresses, which is a problem even in LAN
  211.       environments, is especially difficult over circuit-switched
  212.       point-to-point links (such as dial-up modem servers).  These
  213.       problems are handled by a family of Network Control Protocols
  214.       (NCPs), which each manage the specific needs required by their
  215.  
  216.  
  217.  
  218. Simpson                  expires in six months                  [Page 1]
  219. DRAFT                   Point-to-Point Protocol                 May 1994
  220.  
  221.  
  222.       respective network-layer protocols.  These NCPs are defined in
  223.       companion documents.
  224.  
  225.    Configuration
  226.  
  227.       It is intended that PPP links be easy to configure.  By design,
  228.       the standard defaults handle all common configurations.  The
  229.       implementor can specify improvements to the default configuration,
  230.       which are automatically communicated to the peer without operator
  231.       intervention.  Finally, the operator may explicitly configure
  232.       options for the link which enable the link to operate in
  233.       environments where it would otherwise be impossible.
  234.  
  235.       This self-configuration is implemented through an extensible
  236.       option negotiation mechanism, wherein each end of the link
  237.       describes to the other its capabilities and requirements.
  238.       Although the option negotiation mechanism described in this
  239.       document is specified in terms of the Link Control Protocol (LCP),
  240.       the same facilities are designed to be used by other control
  241.       protocols, especially the family of NCPs.
  242.  
  243.  
  244.  
  245. 1.1.  Specification of Requirements
  246.  
  247.    In this document, several words are used to signify the requirements
  248.    of the specification.  These words are often capitalized.
  249.  
  250.    MUST      This word, or the adjective "required", means that the
  251.              definition is an absolute requirement of the specification.
  252.  
  253.    MUST NOT  This phrase means that the definition is an absolute
  254.              prohibition of the specification.
  255.  
  256.    SHOULD    This word, or the adjective "recommended", means that there
  257.              may exist valid reasons in particular circumstances to
  258.              ignore this item, but the full implications must be
  259.              understood and carefully weighed before choosing a
  260.              different course.
  261.  
  262.    MAY       This word, or the adjective "optional", means that this
  263.              item is one of an allowed set of alternatives.  An
  264.              implementation which does not include this option MUST be
  265.              prepared to interoperate with another implementation which
  266.              does include the option.
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273. Simpson                  expires in six months                  [Page 2]
  274. DRAFT                   Point-to-Point Protocol                 May 1994
  275.  
  276.  
  277. 1.2.  Terminology
  278.  
  279.    This document frequently uses the following terms:
  280.  
  281.    datagram  The unit of transmission in the network layer (such as IP).
  282.              A datagram may be encapsulated in one or more packets
  283.              passed to the data link layer.
  284.  
  285.    frame     The unit of transmission at the data link layer.  A frame
  286.              may include a header and/or a trailer, along with some
  287.              number of units of data.
  288.  
  289.    packet    The basic unit of encapsulation, which is passed across the
  290.              interface between the network layer and the data link
  291.              layer.  A packet is usually mapped to a frame; the
  292.              exceptions are when data link layer fragmentation is being
  293.              performed, or when multiple packets are incorporated into a
  294.              single frame.
  295.  
  296.    peer      The other end of the point-to-point link.
  297.  
  298.    silently discard
  299.              The implementation discards the packet without further
  300.              processing.  The implementation SHOULD provide the
  301.              capability of logging the error, including the contents of
  302.              the silently discarded packet, and SHOULD record the event
  303.              in a statistics counter.
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.  
  328. Simpson                  expires in six months                  [Page 3]
  329. DRAFT                   Point-to-Point Protocol                 May 1994
  330.  
  331.  
  332. 2.  PPP Encapsulation
  333.  
  334.    The PPP encapsulation is used to disambiguate multiprotocol
  335.    datagrams.  This encapsulation requires framing to indicate the
  336.    beginning and end of the encapsulation.  Methods of providing framing
  337.    are specified in companion documents.
  338.  
  339.    A summary of the PPP encapsulation is shown below.  The fields are
  340.    transmitted from left to right.
  341.  
  342.            +----------+-------------+---------+
  343.            | Protocol | Information | Padding |
  344.            | 8/16 bits|      *      |    *    |
  345.            +----------+-------------+---------+
  346.  
  347.  
  348.    Protocol Field
  349.  
  350.       The Protocol field is one or two octets, and its value identifies
  351.       the datagram encapsulated in the Information field of the packet.
  352.       The field is transmitted and received most significant octet
  353.       first.
  354.  
  355.       The structure of this field is consistent with the ISO 3309
  356.       extension mechanism for address fields.  All Protocols MUST be
  357.       odd; the least significant bit of the least significant octet MUST
  358.       equal "1".  Also, all Protocols MUST be assigned such that the
  359.       least significant bit of the most significant octet equals "0".
  360.       Frames received which don't comply with these rules MUST be
  361.       treated as having an unrecognized Protocol.
  362.  
  363.       Protocol field values in the "0***" to "3***" range identify the
  364.       network-layer protocol of specific packets, and values in the
  365.       "8***" to "b***" range identify packets belonging to the
  366.       associated Network Control Protocols (NCPs), if any.
  367.  
  368.       Protocol field values in the "4***" to "7***" range are used for
  369.       protocols with low volume traffic which have no associated NCP.
  370.       Protocol field values in the "c***" to "f***" range identify
  371.       packets as link-layer Control Protocols (such as LCP).
  372.  
  373.       Up-to-date values of the Protocol field are specified in the most
  374.       recent "Assigned Numbers" RFC [2].  This specification reserves
  375.       the following values:
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383. Simpson                  expires in six months                  [Page 4]
  384. DRAFT                   Point-to-Point Protocol                 May 1994
  385.  
  386.  
  387.  
  388.       Value (in hex)  Protocol Name
  389.  
  390.       0001            Padding Protocol
  391.       0003 to 001f    reserved (transparency inefficient)
  392.       007d            reserved (Control Escape)
  393.       00cf            reserved (PPP NLPID)
  394.       00ff            reserved (compression inefficient)
  395.  
  396.       8001 to 801f    unused
  397.       807d            unused
  398.       80cf            unused
  399.       80ff            unused
  400.  
  401.       c021            Link Control Protocol
  402.       c023            Password Authentication Protocol
  403.       c025            Link Quality Report
  404.       c223            Challenge Handshake Authentication Protocol
  405.  
  406.       Developers of new protocols MUST obtain a number from the Internet
  407.       Assigned Numbers Authority (IANA), at IANA@isi.edu.
  408.  
  409.    Information Field
  410.  
  411.       The Information field is zero or more octets.  The Information
  412.       field contains the datagram for the protocol specified in the
  413.       Protocol field.
  414.  
  415.       The maximum length for the Information field, including Padding,
  416.       is termed the Maximum Receive Unit (MRU), which defaults to 1500
  417.       octets.  By negotiation, consenting PPP implementations may use
  418.       other values for the MRU.
  419.  
  420.    Padding
  421.  
  422.       On transmission, the Information field MAY be padded with an
  423.       arbitrary number of octets up to the MRU.  It is the
  424.       responsibility of each protocol to distinguish padding octets from
  425.       real information.
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438. Simpson                  expires in six months                  [Page 5]
  439. DRAFT                   Point-to-Point Protocol                 May 1994
  440.  
  441.  
  442. 3.  PPP Link Operation
  443.  
  444. 3.1.  Overview
  445.  
  446.    In order to establish communications over a point-to-point link, each
  447.    end of the PPP link MUST first send LCP packets to configure and test
  448.    the data link.  After the link has been established, the peer MAY be
  449.    authenticated.
  450.  
  451.    Then, PPP MUST send NCP packets to choose and configure one or more
  452.    network-layer protocols.  Once each of the chosen network-layer
  453.    protocols has been configured, datagrams from each network-layer
  454.    protocol can be sent over the link.
  455.  
  456.    The link will remain configured for communications until explicit LCP
  457.    or NCP packets close the link down, or until some external event
  458.    occurs (an inactivity timer expires or network administrator
  459.    intervention).
  460.  
  461.  
  462.  
  463. 3.2.  Phase Diagram
  464.  
  465.    In the process of configuring, maintaining and terminating the
  466.    point-to-point link, the PPP link goes through several distinct
  467.    phases which are specified in the following simplified state diagram:
  468.  
  469.    +------+        +-----------+           +--------------+
  470.    |      | UP     |           | OPENED    |              | SUCCESS/NONE
  471.    | Dead |------->| Establish |---------->| Authenticate |--+
  472.    |      |        |           |           |              |  |
  473.    +------+        +-----------+           +--------------+  |
  474.       ^               |                        |             |
  475.       |          FAIL |                   FAIL |             |
  476.       +<--------------+             +----------+             |
  477.       |                             |                        |
  478.       |            +-----------+    |           +---------+  |
  479.       |       DOWN |           |    |   CLOSING |         |  |
  480.       +------------| Terminate |<---+<----------| Network |<-+
  481.                    |           |                |         |
  482.                    +-----------+                +---------+
  483.  
  484.    Not all transitions are specified in this diagram.  The following
  485.    semantics MUST be followed.
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493. Simpson                  expires in six months                  [Page 6]
  494. DRAFT                   Point-to-Point Protocol                 May 1994
  495.  
  496.  
  497. 3.3.  Link Dead (physical-layer not ready)
  498.  
  499.    The link necessarily begins and ends with this phase.  When an
  500.    external event (such as carrier detection or network administrator
  501.    configuration) indicates that the physical-layer is ready to be used,
  502.    PPP will proceed to the Link Establishment phase.
  503.  
  504.    During this phase, the LCP automaton (described later) will be in the
  505.    Initial or Starting states.  The transition to the Link Establishment
  506.    phase will signal an Up event to the LCP automaton.
  507.  
  508.    Implementation Note:
  509.  
  510.       Typically, a link will return to this phase automatically after
  511.       the disconnection of a modem.  In the case of a hard-wired link,
  512.       this phase may be extremely short -- merely long enough to detect
  513.       the presence of the device.
  514.  
  515.  
  516.  
  517. 3.4.  Link Establishment Phase
  518.  
  519.    The Link Control Protocol (LCP) is used to establish the connection
  520.    through an exchange of Configure packets.  This exchange is complete,
  521.    and the LCP Opened state entered, once a Configure-Ack packet
  522.    (described later) has been both sent and received.
  523.  
  524.    All Configuration Options are assumed to be at default values unless
  525.    altered by the configuration exchange.  See the chapter on LCP
  526.    Configuration Options for further discussion.
  527.  
  528.    It is important to note that only Configuration Options which are
  529.    independent of particular network-layer protocols are configured by
  530.    LCP.  Configuration of individual network-layer protocols is handled
  531.    by separate Network Control Protocols (NCPs) during the Network-Layer
  532.    Protocol phase.
  533.  
  534.    Any non-LCP packets received during this phase MUST be silently
  535.    discarded.
  536.  
  537.    The receipt of the LCP Configure-Request causes a return to the Link
  538.    Establishment phase from the Network-Layer Protocol phase or
  539.    Authentication phase.
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548. Simpson                  expires in six months                  [Page 7]
  549. DRAFT                   Point-to-Point Protocol                 May 1994
  550.  
  551.  
  552. 3.5.  Authentication Phase
  553.  
  554.    On some links it may be desirable to require a peer to authenticate
  555.    itself before allowing network-layer protocol packets to be
  556.    exchanged.
  557.  
  558.    By default, authentication is not mandatory.  If an implementation
  559.    desires that the peer authenticate with some specific authentication
  560.    protocol, then it MUST request the use of that authentication
  561.    protocol during Link Establishment phase.
  562.  
  563.    Authentication SHOULD take place as soon as possible after link
  564.    establishment.  However, link quality determination MAY occur
  565.    concurrently.  An implementation MUST NOT allow the exchange of link
  566.    quality determination packets to delay authentication indefinitely.
  567.  
  568.    Advancement from the Authentication phase to the Network-Layer
  569.    Protocol phase MUST NOT occur until authentication has completed.  If
  570.    authentication fails, the authenticator SHOULD proceed instead to the
  571.    Link Termination phase.
  572.  
  573.    Only Link Control Protocol, authentication protocol, and link quality
  574.    monitoring packets are allowed during this phase.  All other packets
  575.    received during this phase MUST be silently discarded.
  576.  
  577.    Implementation Notes:
  578.  
  579.       An implementation SHOULD NOT fail authentication simply due to
  580.       timeout or lack of response.  The authentication SHOULD allow some
  581.       method of retransmission, and proceed to the Link Termination
  582.       phase only after a number of authentication attempts has been
  583.       exceeded.
  584.  
  585.       The implementation responsible for commencing Link Termination
  586.       phase is the implementation which has refused authentication to
  587.       its peer.
  588.  
  589.  
  590.  
  591. 3.6.  Network-Layer Protocol Phase
  592.  
  593.    Once PPP has finished the previous phases, each network-layer
  594.    protocol (such as IP, IPX, or AppleTalk) MUST be separately
  595.    configured by the appropriate Network Control Protocol (NCP).
  596.  
  597.    Each NCP MAY be Opened and Closed at any time.
  598.  
  599.  
  600.  
  601.  
  602.  
  603. Simpson                  expires in six months                  [Page 8]
  604. DRAFT                   Point-to-Point Protocol                 May 1994
  605.  
  606.  
  607.    Implementation Note:
  608.  
  609.       Because an implementation may initially use a significant amount
  610.       of time for link quality determination, implementations SHOULD
  611.       avoid fixed timeouts when waiting for their peers to configure a
  612.       NCP.
  613.  
  614.    After a NCP has reached the Opened state, PPP will carry the
  615.    corresponding network-layer protocol packets.  Any supported
  616.    network-layer protocol packets received when the corresponding NCP is
  617.    not in the Opened state MUST be silently discarded.
  618.  
  619.    Implementation Note:
  620.  
  621.       While LCP is in the Opened state, any protocol packet which is
  622.       unsupported by the implementation MUST be returned in a Protocol-
  623.       Reject (described later).  Only protocols which are supported are
  624.       silently discarded.
  625.  
  626.    During this phase, link traffic consists of any possible combination
  627.    of LCP, NCP, and network-layer protocol packets.
  628.  
  629.  
  630.  
  631. 3.7.  Link Termination Phase
  632.  
  633.    PPP can terminate the link at any time.  This might happen because of
  634.    the loss of carrier, authentication failure, link quality failure,
  635.    the expiration of an idle-period timer, or the administrative closing
  636.    of the link.
  637.  
  638.    LCP is used to close the link through an exchange of Terminate
  639.    packets.  When the link is closing, PPP informs the network-layer
  640.    protocols so that they may take appropriate action.
  641.  
  642.    After the exchange of Terminate packets, the implementation SHOULD
  643.    signal the physical-layer to disconnect in order to enforce the
  644.    termination of the link, particularly in the case of an
  645.    authentication failure.  The sender of the Terminate-Request SHOULD
  646.    disconnect after receiving a Terminate-Ack, or after the Restart
  647.    counter expires.  The receiver of a Terminate-Request SHOULD wait for
  648.    the peer to disconnect, and MUST NOT disconnect until at least one
  649.    Restart time has passed after sending a Terminate-Ack.  PPP SHOULD
  650.    proceed to the Link Dead phase.
  651.  
  652.    Any non-LCP packets received during this phase MUST be silently
  653.    discarded.
  654.  
  655.  
  656.  
  657.  
  658. Simpson                  expires in six months                  [Page 9]
  659. DRAFT                   Point-to-Point Protocol                 May 1994
  660.  
  661.  
  662.    Implementation Note:
  663.  
  664.       The closing of the link by LCP is sufficient.  There is no need
  665.       for each NCP to send a flurry of Terminate packets.  Conversely,
  666.       the fact that one NCP has Closed is not sufficient reason to cause
  667.       the termination of the PPP link, even if that NCP was the only NCP
  668.       currently in the Opened state.
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.  
  709.  
  710.  
  711.  
  712.  
  713. Simpson                  expires in six months                 [Page 10]
  714. DRAFT                   Point-to-Point Protocol                 May 1994
  715.  
  716.  
  717. 4.  The Option Negotiation Automaton
  718.  
  719.    The finite-state automaton is defined by events, actions and state
  720.    transitions.  Events include reception of external commands such as
  721.    Open and Close, expiration of the Restart timer, and reception of
  722.    packets from a peer.  Actions include the starting of the Restart
  723.    timer and transmission of packets to the peer.
  724.  
  725.    Some types of packets -- Configure-Naks and Configure-Rejects, or
  726.    Code-Rejects and Protocol-Rejects, or Echo-Requests, Echo-Replies and
  727.    Discard-Requests -- are not differentiated in the automaton
  728.    descriptions.  As will be described later, these packets do indeed
  729.    serve different functions.  However, they always cause the same
  730.    transitions.
  731.  
  732.    Events                                   Actions
  733.  
  734.    Up   = lower layer is Up                 tlu = This-Layer-Up
  735.    Down = lower layer is Down               tld = This-Layer-Down
  736.    Open = administrative Open               tls = This-Layer-Started
  737.    Close= administrative Close              tlf = This-Layer-Finished
  738.  
  739.    TO+  = Timeout with counter > 0          irc = Initialize-Restart-Count
  740.    TO-  = Timeout with counter expired      zrc = Zero-Restart-Count
  741.  
  742.    RCR+ = Receive-Configure-Request (Good)  scr = Send-Configure-Request
  743.    RCR- = Receive-Configure-Request (Bad)
  744.    RCA  = Receive-Configure-Ack             sca = Send-Configure-Ack
  745.    RCN  = Receive-Configure-Nak/Rej         scn = Send-Configure-Nak/Rej
  746.  
  747.    RTR  = Receive-Terminate-Request         str = Send-Terminate-Request
  748.    RTA  = Receive-Terminate-Ack             sta = Send-Terminate-Ack
  749.  
  750.    RUC  = Receive-Unknown-Code              scj = Send-Code-Reject
  751.    RXJ+ = Receive-Code-Reject (permitted)
  752.        or Receive-Protocol-Reject
  753.    RXJ- = Receive-Code-Reject (catastrophic)
  754.        or Receive-Protocol-Reject
  755.    RXR  = Receive-Echo-Request              ser = Send-Echo-Reply
  756.        or Receive-Echo-Reply
  757.        or Receive-Discard-Request
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768. Simpson                  expires in six months                 [Page 11]
  769. DRAFT                   Point-to-Point Protocol                 May 1994
  770.  
  771.  
  772. 4.1.  State Transition Table
  773.  
  774.    The complete state transition table follows.  States are indicated
  775.    horizontally, and events are read vertically.  State transitions and
  776.    actions are represented in the form action/new-state.  Multiple
  777.    actions are separated by commas, and may continue on succeeding lines
  778.    as space requires; multiple actions may be implemented in any
  779.    convenient order.  The state may be followed by a letter, which
  780.    indicates an explanatory footnote.  The dash ('-') indicates an
  781.    illegal transition.
  782.  
  783.       | State
  784.       |    0         1         2         3         4         5
  785. Events| Initial   Starting  Closed    Stopped   Closing   Stopping
  786. ------+-----------------------------------------------------------
  787.  Up   |    2     irc,scr/6     -         -         -         -
  788.  Down |    -         -         0       tls/1       0         1
  789.  Open |  tls/1       1     irc,scr/6     3r        5r        5r
  790.  Close|    0       tlf/0       2         2         4         4
  791.       |
  792.   TO+ |    -         -         -         -       str/4     str/5
  793.   TO- |    -         -         -         -       tlf/2     tlf/3
  794.       |
  795.  RCR+ |    -         -       sta/2 irc,scr,sca/8   4         5
  796.  RCR- |    -         -       sta/2 irc,scr,scn/6   4         5
  797.  RCA  |    -         -       sta/2     sta/3       4         5
  798.  RCN  |    -         -       sta/2     sta/3       4         5
  799.       |
  800.  RTR  |    -         -       sta/2     sta/3     sta/4     sta/5
  801.  RTA  |    -         -         2         3       tlf/2     tlf/3
  802.       |
  803.  RUC  |    -         -       scj/2     scj/3     scj/4     scj/5
  804.  RXJ+ |    -         -         2         3         4         5
  805.  RXJ- |    -         -       tlf/2     tlf/3     tlf/2     tlf/3
  806.       |
  807.  RXR  |    -         -         2         3         4         5
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.  
  822.  
  823. Simpson                  expires in six months                 [Page 12]
  824. DRAFT                   Point-to-Point Protocol                 May 1994
  825.  
  826.  
  827.  
  828.       | State
  829.       |    6         7         8           9
  830. Events| Req-Sent  Ack-Rcvd  Ack-Sent    Opened
  831. ------+-----------------------------------------
  832.  Up   |    -         -         -           -
  833.  Down |    1         1         1         tld/1
  834.  Open |    6         7         8           9r
  835.  Close|irc,str/4 irc,str/4 irc,str/4 tld,irc,str/4
  836.       |
  837.   TO+ |  scr/6     scr/6     scr/8         -
  838.   TO- |  tlf/3p    tlf/3p    tlf/3p        -
  839.       |
  840.  RCR+ |  sca/8   sca,tlu/9   sca/8   tld,scr,sca/8
  841.  RCR- |  scn/6     scn/7     scn/6   tld,scr,scn/6
  842.  RCA  |  irc/7     scr/6x  irc,tlu/9   tld,scr/6x
  843.  RCN  |irc,scr/6   scr/6x  irc,scr/8   tld,scr/6x
  844.       |
  845.  RTR  |  sta/6     sta/6     sta/6   tld,zrc,sta/5
  846.  RTA  |    6         6         8       tld,scr/6
  847.       |
  848.  RUC  |  scj/6     scj/7     scj/8       scj/9
  849.  RXJ+ |    6         6         8           9
  850.  RXJ- |  tlf/3     tlf/3     tlf/3   tld,irc,str/5
  851.       |
  852.  RXR  |    6         7         8         ser/9
  853.  
  854.    The states in which the Restart timer is running are identifiable by
  855.    the presence of TO events.  Only the Send-Configure-Request, Send-
  856.    Terminate-Request and Zero-Restart-Count actions start or re-start
  857.    the Restart timer.  The Restart timer is stopped when transitioning
  858.    from any state where the timer is running to a state where the timer
  859.    is not running.
  860.  
  861.    The events and actions are defined according to a message passing
  862.    architecture, rather than a signalling architecture.  If an action is
  863.    desired to control specific signals (such as DTR), additional actions
  864.    are likely to be required.
  865.  
  866.    [p]   Passive option; see Stopped state discussion.
  867.  
  868.    [r]   Restart option; see Open event discussion.
  869.  
  870.    [x]   Crossed connection; see RCA event discussion.
  871.  
  872.  
  873.  
  874.  
  875.  
  876.  
  877.  
  878. Simpson                  expires in six months                 [Page 13]
  879. DRAFT                   Point-to-Point Protocol                 May 1994
  880.  
  881.  
  882. 4.2.  States
  883.  
  884.    Following is a more detailed description of each automaton state.
  885.  
  886.    Initial
  887.  
  888.       In the Initial state, the lower layer is unavailable (Down), and
  889.       no Open has occurred.  The Restart timer is not running in the
  890.       Initial state.
  891.  
  892.    Starting
  893.  
  894.       The Starting state is the Open counterpart to the Initial state.
  895.       An administrative Open has been initiated, but the lower layer is
  896.       still unavailable (Down).  The Restart timer is not running in the
  897.       Starting state.
  898.  
  899.       When the lower layer becomes available (Up), a Configure-Request
  900.       is sent.
  901.  
  902.    Closed
  903.  
  904.       In the Closed state, the link is available (Up), but no Open has
  905.       occurred.  The Restart timer is not running in the Closed state.
  906.  
  907.       Upon reception of Configure-Request packets, a Terminate-Ack is
  908.       sent.  Terminate-Acks are silently discarded to avoid creating a
  909.       loop.
  910.  
  911.    Stopped
  912.  
  913.       The Stopped state is the Open counterpart to the Closed state.  It
  914.       is entered when the automaton is waiting for a Down event after
  915.       the This-Layer-Finished action, or after sending a Terminate-Ack.
  916.       The Restart timer is not running in the Stopped state.
  917.  
  918.       Upon reception of Configure-Request packets, an appropriate
  919.       response is sent.  Upon reception of other packets, a Terminate-
  920.       Ack is sent.  Terminate-Acks are silently discarded to avoid
  921.       creating a loop.
  922.  
  923.       Rationale:
  924.  
  925.          The Stopped state is a junction state for link termination,
  926.          link configuration failure, and other automaton failure modes.
  927.          These potentially separate states have been combined.
  928.  
  929.          There is a race condition between the Down event response (from
  930.  
  931.  
  932.  
  933. Simpson                  expires in six months                 [Page 14]
  934. DRAFT                   Point-to-Point Protocol                 May 1994
  935.  
  936.  
  937.          the This-Layer-Finished action) and the Receive-Configure-
  938.          Request event.  When a Configure-Request arrives before the
  939.          Down event, the Down event will supercede by returning the
  940.          automaton to the Starting state.  This prevents attack by
  941.          repetition.
  942.  
  943.       Implementation Option:
  944.  
  945.          After the peer fails to respond to Configure-Requests, an
  946.          implementation MAY wait passively for the peer to send
  947.          Configure-Requests.  In this case, the This-Layer-Finished
  948.          action is not used for the TO- event in states Req-Sent, Ack-
  949.          Rcvd and Ack-Sent.
  950.  
  951.          This option is useful for dedicated circuits, or circuits which
  952.          have no status signals available, but SHOULD NOT be used for
  953.          switched circuits.
  954.  
  955.    Closing
  956.  
  957.       In the Closing state, an attempt is made to terminate the
  958.       connection.  A Terminate-Request has been sent and the Restart
  959.       timer is running, but a Terminate-Ack has not yet been received.
  960.  
  961.       Upon reception of a Terminate-Ack, the Closed state is entered.
  962.       Upon the expiration of the Restart timer, a new Terminate-Request
  963.       is transmitted, and the Restart timer is restarted.  After the
  964.       Restart timer has expired Max-Terminate times, the Closed state is
  965.       entered.
  966.  
  967.    Stopping
  968.  
  969.       The Stopping state is the Open counterpart to the Closing state.
  970.       A Terminate-Request has been sent and the Restart timer is
  971.       running, but a Terminate-Ack has not yet been received.
  972.  
  973.       Rationale:
  974.  
  975.          The Stopping state provides a well defined opportunity to
  976.          terminate a link before allowing new traffic.  After the link
  977.          has terminated, a new configuration may occur via the Stopped
  978.          or Starting states.
  979.  
  980.    Request-Sent
  981.  
  982.       In the Request-Sent state an attempt is made to configure the
  983.       connection.  A Configure-Request has been sent and the Restart
  984.       timer is running, but a Configure-Ack has not yet been received
  985.  
  986.  
  987.  
  988. Simpson                  expires in six months                 [Page 15]
  989. DRAFT                   Point-to-Point Protocol                 May 1994
  990.  
  991.  
  992.       nor has one been sent.
  993.  
  994.    Ack-Received
  995.  
  996.       In the Ack-Received state, a Configure-Request has been sent and a
  997.       Configure-Ack has been received.  The Restart timer is still
  998.       running, since a Configure-Ack has not yet been sent.
  999.  
  1000.    Ack-Sent
  1001.  
  1002.       In the Ack-Sent state, a Configure-Request and a Configure-Ack
  1003.       have both been sent, but a Configure-Ack has not yet been
  1004.       received.  The Restart timer is running, since a Configure-Ack has
  1005.       not yet been received.
  1006.  
  1007.    Opened
  1008.  
  1009.       In the Opened state, a Configure-Ack has been both sent and
  1010.       received.  The Restart timer is not running.
  1011.  
  1012.       When entering the Opened state, the implementation SHOULD signal
  1013.       the upper layers that it is now Up.  Conversely, when leaving the
  1014.       Opened state, the implementation SHOULD signal the upper layers
  1015.       that it is now Down.
  1016.  
  1017.  
  1018.  
  1019. 4.3.  Events
  1020.  
  1021.    Transitions and actions in the automaton are caused by events.
  1022.  
  1023.    Up
  1024.  
  1025.       This event occurs when a lower layer indicates that it is ready to
  1026.       carry packets.
  1027.  
  1028.       Typically, this event is used by a modem handling or calling
  1029.       process, or by some other coupling of the PPP link to the physical
  1030.       media, to signal LCP that the link is entering Link Establishment
  1031.       phase.
  1032.  
  1033.       It also can be used by LCP to signal each NCP that the link is
  1034.       entering Network-Layer Protocol phase.  That is, the This-Layer-Up
  1035.       action from LCP triggers the Up event in the NCP.
  1036.  
  1037.    Down
  1038.  
  1039.       This event occurs when a lower layer indicates that it is no
  1040.  
  1041.  
  1042.  
  1043. Simpson                  expires in six months                 [Page 16]
  1044. DRAFT                   Point-to-Point Protocol                 May 1994
  1045.  
  1046.  
  1047.       longer ready to carry packets.
  1048.  
  1049.       Typically, this event is used by a modem handling or calling
  1050.       process, or by some other coupling of the PPP link to the physical
  1051.       media, to signal LCP that the link is entering Link Dead phase.
  1052.  
  1053.       It also can be used by LCP to signal each NCP that the link is
  1054.       leaving Network-Layer Protocol phase.  That is, the This-Layer-
  1055.       Down action from LCP triggers the Down event in the NCP.
  1056.  
  1057.    Open
  1058.  
  1059.       This event indicates that the link is administratively available
  1060.       for traffic; that is, the network administrator (human or program)
  1061.       has indicated that the link is allowed to be Opened.  When this
  1062.       event occurs, and the link is not in the Opened state, the
  1063.       automaton attempts to send configuration packets to the peer.
  1064.  
  1065.       If the automaton is not able to begin configuration (the lower
  1066.       layer is Down, or a previous Close event has not completed), the
  1067.       establishment of the link is automatically delayed.
  1068.  
  1069.       When a Terminate-Request is received, or other events occur which
  1070.       cause the link to become unavailable, the automaton will progress
  1071.       to a state where the link is ready to re-open.  No additional
  1072.       administrative intervention is necessary.
  1073.  
  1074.       Implementation Option:
  1075.  
  1076.          Experience has shown that users will execute an additional Open
  1077.          command when they want to renegotiate the link.  This might
  1078.          indicate that new values are to be negotiated.
  1079.  
  1080.          Since this is not the meaning of the Open event, it is
  1081.          suggested that when an Open user command is executed in the
  1082.          Opened, Closing, Stopping, or Stopped states, the
  1083.          implementation issue a Down event, immediately followed by an
  1084.          Up event.  Care must be taken that an intervening Down event
  1085.          cannot occur from another source.
  1086.  
  1087.          The Down followed by an Up will cause an orderly renegotiation
  1088.          of the link, by progressing through the Starting to the
  1089.          Request-Sent state.  This will cause the renegotiation of the
  1090.          link, without any harmful side effects.
  1091.  
  1092.    Close
  1093.  
  1094.       This event indicates that the link is not available for traffic;
  1095.  
  1096.  
  1097.  
  1098. Simpson                  expires in six months                 [Page 17]
  1099. DRAFT                   Point-to-Point Protocol                 May 1994
  1100.  
  1101.  
  1102.       that is, the network administrator (human or program) has
  1103.       indicated that the link is not allowed to be Opened.  When this
  1104.       event occurs, and the link is not in the Closed state, the
  1105.       automaton attempts to terminate the connection.  Futher attempts
  1106.       to re-configure the link are denied until a new Open event occurs.
  1107.  
  1108.       Implementation Note:
  1109.  
  1110.          When authentication fails, the link SHOULD be terminated, to
  1111.          prevent attack by repetition and denial of service to other
  1112.          users.  Since the link is administratively available (by
  1113.          definition), this can be accomplished by simulating a Close
  1114.          event to the LCP, immediately followed by an Open event.  Care
  1115.          must be taken that an intervening Close event cannot occur from
  1116.          another source.
  1117.  
  1118.          The Close followed by an Open will cause an orderly termination
  1119.          of the link, by progressing through the Closing to the Stopping
  1120.          state, and the This-Layer-Finished action can disconnect the
  1121.          link.  The automaton waits in the Stopped or Starting states
  1122.          for the next connection attempt.
  1123.  
  1124.    Timeout (TO+,TO-)
  1125.  
  1126.       This event indicates the expiration of the Restart timer.  The
  1127.       Restart timer is used to time responses to Configure-Request and
  1128.       Terminate-Request packets.
  1129.  
  1130.       The TO+ event indicates that the Restart counter continues to be
  1131.       greater than zero, which triggers the corresponding Configure-
  1132.       Request or Terminate-Request packet to be retransmitted.
  1133.  
  1134.       The TO- event indicates that the Restart counter is not greater
  1135.       than zero, and no more packets need to be retransmitted.
  1136.  
  1137.    Receive-Configure-Request (RCR+,RCR-)
  1138.  
  1139.       This event occurs when a Configure-Request packet is received from
  1140.       the peer.  The Configure-Request packet indicates the desire to
  1141.       open a connection and may specify Configuration Options.  The
  1142.       Configure-Request packet is more fully described in a later
  1143.       section.
  1144.  
  1145.       The RCR+ event indicates that the Configure-Request was
  1146.       acceptable, and triggers the transmission of a corresponding
  1147.       Configure-Ack.
  1148.  
  1149.       The RCR- event indicates that the Configure-Request was
  1150.  
  1151.  
  1152.  
  1153. Simpson                  expires in six months                 [Page 18]
  1154. DRAFT                   Point-to-Point Protocol                 May 1994
  1155.  
  1156.  
  1157.       unacceptable, and triggers the transmission of a corresponding
  1158.       Configure-Nak or Configure-Reject.
  1159.  
  1160.       Implementation Note:
  1161.  
  1162.          These events may occur on a connection which is already in the
  1163.          Opened state.  The implementation MUST be prepared to
  1164.          immediately renegotiate the Configuration Options.
  1165.  
  1166.    Receive-Configure-Ack (RCA)
  1167.  
  1168.       This event occurs when a valid Configure-Ack packet is received
  1169.       from the peer.  The Configure-Ack packet is a positive response to
  1170.       a Configure-Request packet.  An out of sequence or otherwise
  1171.       invalid packet is silently discarded.
  1172.  
  1173.       Implementation Note:
  1174.  
  1175.          Since the correct packet has already been received before
  1176.          reaching the Ack-Rcvd or Opened states, it is extremely
  1177.          unlikely that another such packet will arrive.  As specified,
  1178.          all invalid Ack/Nak/Rej packets are silently discarded, and do
  1179.          not affect the transitions of the automaton.
  1180.  
  1181.          However, it is not impossible that a correctly formed packet
  1182.          will arrive through a coincidentally-timed cross-connection.
  1183.          It is more likely to be the result of an implementation error.
  1184.          At the very least, this occurance SHOULD be logged.
  1185.  
  1186.    Receive-Configure-Nak/Rej (RCN)
  1187.  
  1188.       This event occurs when a valid Configure-Nak or Configure-Reject
  1189.       packet is received from the peer.  The Configure-Nak and
  1190.       Configure-Reject packets are negative responses to a Configure-
  1191.       Request packet.  An out of sequence or otherwise invalid packet is
  1192.       silently discarded.
  1193.  
  1194.       Implementation Note:
  1195.  
  1196.          Although the Configure-Nak and Configure-Reject cause the same
  1197.          state transition in the automaton, these packets have
  1198.          significantly different effects on the Configuration Options
  1199.          sent in the resulting Configure-Request packet.
  1200.  
  1201.    Receive-Terminate-Request (RTR)
  1202.  
  1203.       This event occurs when a Terminate-Request packet is received.
  1204.       The Terminate-Request packet indicates the desire of the peer to
  1205.  
  1206.  
  1207.  
  1208. Simpson                  expires in six months                 [Page 19]
  1209. DRAFT                   Point-to-Point Protocol                 May 1994
  1210.  
  1211.  
  1212.       close the connection.
  1213.  
  1214.       Implementation Note:
  1215.  
  1216.          This event is not identical to the Close event (see above), and
  1217.          does not override the Open commands of the local network
  1218.          administrator.  The implementation MUST be prepared to receive
  1219.          a new Configure-Request without network administrator
  1220.          intervention.
  1221.  
  1222.    Receive-Terminate-Ack (RTA)
  1223.  
  1224.       This event occurs when a Terminate-Ack packet is received from the
  1225.       peer.  The Terminate-Ack packet is usually a response to a
  1226.       Terminate-Request packet.  The Terminate-Ack packet may also
  1227.       indicate that the peer is in Closed or Stopped states, and serves
  1228.       to re-synchronize the link configuration.
  1229.  
  1230.    Receive-Unknown-Code (RUC)
  1231.  
  1232.       This event occurs when an un-interpretable packet is received from
  1233.       the peer.  A Code-Reject packet is sent in response.
  1234.  
  1235.    Receive-Code-Reject, Receive-Protocol-Reject (RXJ+,RXJ-)
  1236.  
  1237.       This event occurs when a Code-Reject or a Protocol-Reject packet
  1238.       is received from the peer.
  1239.  
  1240.       The RXJ+ event arises when the rejected value is acceptable, such
  1241.       as a Code-Reject of an extended code, or a Protocol-Reject of a
  1242.       NCP.  These are within the scope of normal operation.  The
  1243.       implementation MUST stop sending the offending packet type.
  1244.  
  1245.       The RXJ- event arises when the rejected value is catastrophic,
  1246.       such as a Code-Reject of Configure-Request, or a Protocol-Reject
  1247.       of LCP!  This event communicates an unrecoverable error that
  1248.       terminates the connection.
  1249.  
  1250.    Receive-Echo-Request, Receive-Echo-Reply, Receive-Discard-Request
  1251.    (RXR)
  1252.  
  1253.       This event occurs when an Echo-Request, Echo-Reply or Discard-
  1254.       Request packet is received from the peer.  The Echo-Reply packet
  1255.       is a response to an Echo-Request packet.  There is no reply to an
  1256.       Echo-Reply or Discard-Request packet.
  1257.  
  1258.  
  1259.  
  1260.  
  1261.  
  1262.  
  1263. Simpson                  expires in six months                 [Page 20]
  1264. DRAFT                   Point-to-Point Protocol                 May 1994
  1265.  
  1266.  
  1267. 4.4.  Actions
  1268.  
  1269.    Actions in the automaton are caused by events and typically indicate
  1270.    the transmission of packets and/or the starting or stopping of the
  1271.    Restart timer.
  1272.  
  1273.    Illegal-Event (-)
  1274.  
  1275.       This indicates an event that cannot occur in a properly
  1276.       implemented automaton.  The implementation has an internal error,
  1277.       which should be reported and logged.  No transition is taken, and
  1278.       the implementation SHOULD NOT reset or freeze.
  1279.  
  1280.    This-Layer-Up (tlu)
  1281.  
  1282.       This action indicates to the upper layers that the automaton is
  1283.       entering the Opened state.
  1284.  
  1285.       Typically, this action is used by the LCP to signal the Up event
  1286.       to a NCP, Authentication Protocol, or Link Quality Protocol, or
  1287.       MAY be used by a NCP to indicate that the link is available for
  1288.       its network layer traffic.
  1289.  
  1290.    This-Layer-Down (tld)
  1291.  
  1292.       This action indicates to the upper layers that the automaton is
  1293.       leaving the Opened state.
  1294.  
  1295.       Typically, this action is used by the LCP to signal the Down event
  1296.       to a NCP, Authentication Protocol, or Link Quality Protocol, or
  1297.       MAY be used by a NCP to indicate that the link is no longer
  1298.       available for its network layer traffic.
  1299.  
  1300.    This-Layer-Started (tls)
  1301.  
  1302.       This action indicates to the lower layers that the automaton is
  1303.       entering the Starting state, and the lower layer is needed for the
  1304.       link.  The lower layer SHOULD respond with an Up event when the
  1305.       lower layer is available.
  1306.  
  1307.       This results of this action are highly implementation dependent.
  1308.  
  1309.    This-Layer-Finished (tlf)
  1310.  
  1311.       This action indicates to the lower layers that the automaton is
  1312.       entering the Initial, Closed or Stopped states, and the lower
  1313.       layer is no longer needed for the link.  The lower layer SHOULD
  1314.       respond with a Down event when the lower layer has terminated.
  1315.  
  1316.  
  1317.  
  1318. Simpson                  expires in six months                 [Page 21]
  1319. DRAFT                   Point-to-Point Protocol                 May 1994
  1320.  
  1321.  
  1322.       Typically, this action MAY be used by the LCP to advance to the
  1323.       Link Dead phase, or MAY be used by a NCP to indicate to the LCP
  1324.       that the link may terminate when there are no other NCPs open.
  1325.  
  1326.       This results of this action are highly implementation dependent.
  1327.  
  1328.    Initialize-Restart-Count (irc)
  1329.  
  1330.       This action sets the Restart counter to the appropriate value
  1331.       (Max-Terminate or Max-Configure).  The counter is decremented for
  1332.       each transmission, including the first.
  1333.  
  1334.       Implementation Note:
  1335.  
  1336.          In addition to setting the Restart counter, the implementation
  1337.          MUST set the timeout period to the initial value when Restart
  1338.          timer backoff is used.
  1339.  
  1340.    Zero-Restart-Count (zrc)
  1341.  
  1342.       This action sets the Restart counter to zero.
  1343.  
  1344.       Implementation Note:
  1345.  
  1346.          This action enables the FSA to pause before proceeding to the
  1347.          desired final state, allowing traffic to be processed by the
  1348.          peer.  In addition to zeroing the Restart counter, the
  1349.          implementation MUST set the timeout period to an appropriate
  1350.          value.
  1351.  
  1352.    Send-Configure-Request (scr)
  1353.  
  1354.       A Configure-Request packet is transmitted.  This indicates the
  1355.       desire to open a connection with a specified set of Configuration
  1356.       Options.  The Restart timer is started when the Configure-Request
  1357.       packet is transmitted, to guard against packet loss.  The Restart
  1358.       counter is decremented each time a Configure-Request is sent.
  1359.  
  1360.    Send-Configure-Ack (sca)
  1361.  
  1362.       A Configure-Ack packet is transmitted.  This acknowledges the
  1363.       reception of a Configure-Request packet with an acceptable set of
  1364.       Configuration Options.
  1365.  
  1366.    Send-Configure-Nak (scn)
  1367.  
  1368.       A Configure-Nak or Configure-Reject packet is transmitted, as
  1369.       appropriate.  This negative response reports the reception of a
  1370.  
  1371.  
  1372.  
  1373. Simpson                  expires in six months                 [Page 22]
  1374. DRAFT                   Point-to-Point Protocol                 May 1994
  1375.  
  1376.  
  1377.       Configure-Request packet with an unacceptable set of Configuration
  1378.       Options.
  1379.  
  1380.       Configure-Nak packets are used to refuse a Configuration Option
  1381.       value, and to suggest a new, acceptable value.  Configure-Reject
  1382.       packets are used to refuse all negotiation about a Configuration
  1383.       Option, typically because it is not recognized or implemented.
  1384.       The use of Configure-Nak versus Configure-Reject is more fully
  1385.       described in the chapter on LCP Packet Formats.
  1386.  
  1387.    Send-Terminate-Request (str)
  1388.  
  1389.       A Terminate-Request packet is transmitted.  This indicates the
  1390.       desire to close a connection.  The Restart timer is started when
  1391.       the Terminate-Request packet is transmitted, to guard against
  1392.       packet loss.  The Restart counter is decremented each time a
  1393.       Terminate-Request is sent.
  1394.  
  1395.    Send-Terminate-Ack (sta)
  1396.  
  1397.       A Terminate-Ack packet is transmitted.  This acknowledges the
  1398.       reception of a Terminate-Request packet or otherwise serves to
  1399.       synchronize the automatons.
  1400.  
  1401.    Send-Code-Reject (scj)
  1402.  
  1403.       A Code-Reject packet is transmitted.  This indicates the reception
  1404.       of an unknown type of packet.
  1405.  
  1406.    Send-Echo-Reply (ser)
  1407.  
  1408.       An Echo-Reply packet is transmitted.  This acknowledges the
  1409.       reception of an Echo-Request packet.
  1410.  
  1411.  
  1412.  
  1413. 4.5.  Loop Avoidance
  1414.  
  1415.    The protocol makes a reasonable attempt at avoiding Configuration
  1416.    Option negotiation loops.  However, the protocol does NOT guarantee
  1417.    that loops will not happen.  As with any negotiation, it is possible
  1418.    to configure two PPP implementations with conflicting policies that
  1419.    will never converge.  It is also possible to configure policies which
  1420.    do converge, but which take significant time to do so.  Implementors
  1421.    should keep this in mind and SHOULD implement loop detection
  1422.    mechanisms or higher level timeouts.
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428. Simpson                  expires in six months                 [Page 23]
  1429. DRAFT                   Point-to-Point Protocol                 May 1994
  1430.  
  1431.  
  1432. 4.6.  Counters and Timers
  1433.  
  1434.    Restart Timer
  1435.  
  1436.       There is one special timer used by the automaton.  The Restart
  1437.       timer is used to time transmissions of Configure-Request and
  1438.       Terminate-Request packets.  Expiration of the Restart timer causes
  1439.       a Timeout event, and retransmission of the corresponding
  1440.       Configure-Request or Terminate-Request packet.  The Restart timer
  1441.       MUST be configurable, but SHOULD default to three (3) seconds.
  1442.  
  1443.       Implementation Note:
  1444.  
  1445.          The Restart timer SHOULD be based on the speed of the link.
  1446.          The default value is designed for low speed (2,400 to 9,600
  1447.          bps), high switching latency links (typical telephone lines).
  1448.          Higher speed links, or links with low switching latency, SHOULD
  1449.          have correspondingly faster retransmission times.
  1450.  
  1451.          Instead of a constant value, the Restart timer MAY begin at an
  1452.          initial small value and increase to the configured final value.
  1453.          Each successive value less than the final value SHOULD be at
  1454.          least twice the previous value.  The initial value SHOULD be
  1455.          large enough to account for the size of the packets, twice the
  1456.          round trip time for transmission at the link speed, and at
  1457.          least an additional 100 milliseconds to allow the peer to
  1458.          process the packets before responding.  Some circuits add
  1459.          another 200 milliseconds of satellite delay.  Round trip times
  1460.          for modems operating at 14,400 bps have been measured in the
  1461.          range of 160 to more than 600 milliseconds.
  1462.  
  1463.    Max-Terminate
  1464.  
  1465.       There is one required restart counter for Terminate-Requests.
  1466.       Max-Terminate indicates the number of Terminate-Request packets
  1467.       sent without receiving a Terminate-Ack before assuming that the
  1468.       peer is unable to respond.  Max-Terminate MUST be configurable,
  1469.       but SHOULD default to two (2) transmissions.
  1470.  
  1471.    Max-Configure
  1472.  
  1473.       A similar counter is recommended for Configure-Requests.  Max-
  1474.       Configure indicates the number of Configure-Request packets sent
  1475.       without receiving a valid Configure-Ack, Configure-Nak or
  1476.       Configure-Reject before assuming that the peer is unable to
  1477.       respond.  Max-Configure MUST be configurable, but SHOULD default
  1478.       to ten (10) transmissions.
  1479.  
  1480.  
  1481.  
  1482.  
  1483. Simpson                  expires in six months                 [Page 24]
  1484. DRAFT                   Point-to-Point Protocol                 May 1994
  1485.  
  1486.  
  1487.    Max-Failure
  1488.  
  1489.       A related counter is recommended for Configure-Nak.  Max-Failure
  1490.       indicates the number of Configure-Nak packets sent without sending
  1491.       a Configure-Ack before assuming that configuration is not
  1492.       converging.  Any further Configure-Nak packets for peer requested
  1493.       options are converted to Configure-Reject packets, and locally
  1494.       desired options are no longer appended.  Max-Failure MUST be
  1495.       configurable, but SHOULD default to five (5) transmissions.
  1496.  
  1497.  
  1498.  
  1499.  
  1500.  
  1501.  
  1502.  
  1503.  
  1504.  
  1505.  
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  
  1514.  
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538. Simpson                  expires in six months                 [Page 25]
  1539. DRAFT                   Point-to-Point Protocol                 May 1994
  1540.  
  1541.  
  1542. 5.  LCP Packet Formats
  1543.  
  1544.    There are three classes of LCP packets:
  1545.  
  1546.       1. Link Configuration packets used to establish and configure a
  1547.          link (Configure-Request, Configure-Ack, Configure-Nak and
  1548.          Configure-Reject).
  1549.  
  1550.       2. Link Termination packets used to terminate a link (Terminate-
  1551.          Request and Terminate-Ack).
  1552.  
  1553.       3. Link Maintenance packets used to manage and debug a link
  1554.          (Code-Reject, Protocol-Reject, Echo-Request, Echo-Reply, and
  1555.          Discard-Request).
  1556.  
  1557.    In the interest of simplicity, there is no version field in the LCP
  1558.    packet.  A correctly functioning LCP implementation will always
  1559.    respond to unknown Protocols and Codes with an easily recognizable
  1560.    LCP packet, thus providing a deterministic fallback mechanism for
  1561.    implementations of other versions.
  1562.  
  1563.    Regardless of which Configuration Options are enabled, all LCP Link
  1564.    Configuration, Link Termination, and Code-Reject packets (codes 1
  1565.    through 7) are always sent as if no Configuration Options were
  1566.    negotiated.  In particular, each Configuration Option specifies a
  1567.    default value.  This ensures that such LCP packets are always
  1568.    recognizable, even when one end of the link mistakenly believes the
  1569.    link to be open.
  1570.  
  1571.    Exactly one LCP packet is encapsulated in the PPP Information field,
  1572.    where the PPP Protocol field indicates type hex c021 (Link Control
  1573.    Protocol).
  1574.  
  1575.    A summary of the Link Control Protocol packet format is shown below.
  1576.    The fields are transmitted from left to right.
  1577.  
  1578.     0                   1                   2                   3
  1579.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1580.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1581.    |     Code      |  Identifier   |            Length             |
  1582.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1583.    |    Data ...
  1584.    +-+-+-+-+
  1585.  
  1586.  
  1587.    Code
  1588.  
  1589.       The Code field is one octet, and identifies the kind of LCP
  1590.  
  1591.  
  1592.  
  1593. Simpson                  expires in six months                 [Page 26]
  1594. DRAFT                   Point-to-Point Protocol                 May 1994
  1595.  
  1596.  
  1597.       packet.  When a packet is received with an unknown Code field, a
  1598.       Code-Reject packet is transmitted.
  1599.  
  1600.       Up-to-date values of the LCP Code field are specified in the most
  1601.       recent "Assigned Numbers" RFC [2].  This document concerns the
  1602.       following values:
  1603.  
  1604.          1       Configure-Request
  1605.          2       Configure-Ack
  1606.          3       Configure-Nak
  1607.          4       Configure-Reject
  1608.          5       Terminate-Request
  1609.          6       Terminate-Ack
  1610.          7       Code-Reject
  1611.          8       Protocol-Reject
  1612.          9       Echo-Request
  1613.          10      Echo-Reply
  1614.          11      Discard-Request
  1615.  
  1616.  
  1617.    Identifier
  1618.  
  1619.       The Identifier field is one octet, and aids in matching requests
  1620.       and replies.  When a packet is received with an invalid Identifier
  1621.       field, the packet is silently discarded without affecting the
  1622.       automaton.
  1623.  
  1624.    Length
  1625.  
  1626.       The Length field is two octets, and indicates the length of the
  1627.       LCP packet, including the Code, Identifier, Length and Data
  1628.       fields.  The Length MUST NOT exceed the MRU of the link.
  1629.  
  1630.       Octets outside the range of the Length field are treated as
  1631.       padding and are ignored on reception.  When a packet is received
  1632.       with an invalid Length field, the packet is silently discarded
  1633.       without affecting the automaton.
  1634.  
  1635.    Data
  1636.  
  1637.       The Data field is zero or more octets, as indicated by the Length
  1638.       field.  The format of the Data field is determined by the Code
  1639.       field.
  1640.  
  1641.  
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.  
  1648. Simpson                  expires in six months                 [Page 27]
  1649. DRAFT                   Point-to-Point Protocol                 May 1994
  1650.  
  1651.  
  1652. 5.1.  Configure-Request
  1653.  
  1654.    Description
  1655.  
  1656.       An implementation wishing to open a connection MUST transmit a
  1657.       Configure-Request.  The Options field is filled with any desired
  1658.       changes to the link defaults.  Configuration Options SHOULD NOT be
  1659.       included with default values.
  1660.  
  1661.       Upon reception of a Configure-Request, an appropriate reply MUST
  1662.       be transmitted.
  1663.  
  1664.    A summary of the Configure-Request packet format is shown below.  The
  1665.    fields are transmitted from left to right.
  1666.  
  1667.     0                   1                   2                   3
  1668.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1669.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1670.    |     Code      |  Identifier   |            Length             |
  1671.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1672.    | Options ...
  1673.    +-+-+-+-+
  1674.  
  1675.  
  1676.    Code
  1677.  
  1678.       1 for Configure-Request.
  1679.  
  1680.    Identifier
  1681.  
  1682.       The Identifier field MUST be changed whenever the contents of the
  1683.       Options field changes, and whenever a valid reply has been
  1684.       received for a previous request.  For retransmissions, the
  1685.       Identifier MAY remain unchanged.
  1686.  
  1687.    Options
  1688.  
  1689.       The options field is variable in length, and contains the list of
  1690.       zero or more Configuration Options that the sender desires to
  1691.       negotiate.  All Configuration Options are always negotiated
  1692.       simultaneously.  The format of Configuration Options is further
  1693.       described in a later chapter.
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700.  
  1701.  
  1702.  
  1703. Simpson                  expires in six months                 [Page 28]
  1704. DRAFT                   Point-to-Point Protocol                 May 1994
  1705.  
  1706.  
  1707. 5.2.  Configure-Ack
  1708.  
  1709.    Description
  1710.  
  1711.       If every Configuration Option received in a Configure-Request is
  1712.       recognizable and all values are acceptable, then the
  1713.       implementation MUST transmit a Configure-Ack.  The acknowledged
  1714.       Configuration Options MUST NOT be reordered or modified in any
  1715.       way.
  1716.  
  1717.       On reception of a Configure-Ack, the Identifier field MUST match
  1718.       that of the last transmitted Configure-Request.  Additionally, the
  1719.       Configuration Options in a Configure-Ack MUST exactly match those
  1720.       of the last transmitted Configure-Request.  Invalid packets are
  1721.       silently discarded.
  1722.  
  1723.    A summary of the Configure-Ack packet format is shown below.  The
  1724.    fields are transmitted from left to right.
  1725.  
  1726.     0                   1                   2                   3
  1727.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1728.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1729.    |     Code      |  Identifier   |            Length             |
  1730.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1731.    | Options ...
  1732.    +-+-+-+-+
  1733.  
  1734.  
  1735.    Code
  1736.  
  1737.       2 for Configure-Ack.
  1738.  
  1739.    Identifier
  1740.  
  1741.       The Identifier field is a copy of the Identifier field of the
  1742.       Configure-Request which caused this Configure-Ack.
  1743.  
  1744.    Options
  1745.  
  1746.       The Options field is variable in length, and contains the list of
  1747.       zero or more Configuration Options that the sender is
  1748.       acknowledging.  All Configuration Options are always acknowledged
  1749.       simultaneously.
  1750.  
  1751.  
  1752.  
  1753.  
  1754.  
  1755.  
  1756.  
  1757.  
  1758. Simpson                  expires in six months                 [Page 29]
  1759. DRAFT                   Point-to-Point Protocol                 May 1994
  1760.  
  1761.  
  1762. 5.3.  Configure-Nak
  1763.  
  1764.    Description
  1765.  
  1766.       If every instance of the received Configuration Options is
  1767.       recognizable, but some values are not acceptable, then the
  1768.       implementation MUST transmit a Configure-Nak.  The Options field
  1769.       is filled with only the unacceptable Configuration Options from
  1770.       the Configure-Request.  All acceptable Configuration Options are
  1771.       filtered out of the Configure-Nak, but otherwise the Configuration
  1772.       Options from the Configure-Request MUST NOT be reordered.
  1773.  
  1774.       Options which have no value fields (boolean options) MUST use the
  1775.       Configure-Reject reply instead.
  1776.  
  1777.       Each Configuration Option which is allowed only a single instance
  1778.       MUST be modified to a value acceptable to the Configure-Nak
  1779.       sender.  The default value MAY be used, when this differs from the
  1780.       requested value.
  1781.  
  1782.       When a particular type of Configuration Option can be listed more
  1783.       than once with different values, the Configure-Nak MUST include a
  1784.       list of all values for that option which are acceptable to the
  1785.       Configure-Nak sender.  This includes acceptable values that were
  1786.       present in the Configure-Request.
  1787.  
  1788.       Finally, an implementation may be configured to request the
  1789.       negotiation of a specific Configuration Option.  If that option is
  1790.       not listed, then that option MAY be appended to the list of Nak'd
  1791.       Configuration Options, in order to prompt the peer to include that
  1792.       option in its next Configure-Request packet.  Any value fields for
  1793.       the option MUST indicate values acceptable to the Configure-Nak
  1794.       sender.
  1795.  
  1796.       On reception of a Configure-Nak, the Identifier field MUST match
  1797.       that of the last transmitted Configure-Request.  Invalid packets
  1798.       are silently discarded.
  1799.  
  1800.       Reception of a valid Configure-Nak indicates that when a new
  1801.       Configure-Request is sent, the Configuration Options MAY be
  1802.       modified as specified in the Configure-Nak.  When multiple
  1803.       instances of a Configuration Option are present, the peer SHOULD
  1804.       select a single value to include in its next Configure-Request
  1805.       packet.
  1806.  
  1807.       Some Configuration Options have a variable length.  Since the
  1808.       Nak'd Option has been modified by the peer, the implementation
  1809.       MUST be able to handle an Option length which is different from
  1810.  
  1811.  
  1812.  
  1813. Simpson                  expires in six months                 [Page 30]
  1814. DRAFT                   Point-to-Point Protocol                 May 1994
  1815.  
  1816.  
  1817.       the original Configure-Request.
  1818.  
  1819.    A summary of the Configure-Nak packet format is shown below.  The
  1820.    fields are transmitted from left to right.
  1821.  
  1822.     0                   1                   2                   3
  1823.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1824.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1825.    |     Code      |  Identifier   |            Length             |
  1826.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1827.    | Options ...
  1828.    +-+-+-+-+
  1829.  
  1830.  
  1831.    Code
  1832.  
  1833.       3 for Configure-Nak.
  1834.  
  1835.    Identifier
  1836.  
  1837.       The Identifier field is a copy of the Identifier field of the
  1838.       Configure-Request which caused this Configure-Nak.
  1839.  
  1840.    Options
  1841.  
  1842.       The Options field is variable in length, and contains the list of
  1843.       zero or more Configuration Options that the sender is Nak'ing.
  1844.       All Configuration Options are always Nak'd simultaneously.
  1845.  
  1846.  
  1847.  
  1848. 5.4.  Configure-Reject
  1849.  
  1850.    Description
  1851.  
  1852.       If some Configuration Options received in a Configure-Request are
  1853.       not recognizable or are not acceptable for negotiation (as
  1854.       configured by a network administrator), then the implementation
  1855.       MUST transmit a Configure-Reject.  The Options field is filled
  1856.       with only the unacceptable Configuration Options from the
  1857.       Configure-Request.  All recognizable and negotiable Configuration
  1858.       Options are filtered out of the Configure-Reject, but otherwise
  1859.       the Configuration Options MUST NOT be reordered or modified in any
  1860.       way.
  1861.  
  1862.       On reception of a Configure-Reject, the Identifier field MUST
  1863.       match that of the last transmitted Configure-Request.
  1864.       Additionally, the Configuration Options in a Configure-Reject MUST
  1865.  
  1866.  
  1867.  
  1868. Simpson                  expires in six months                 [Page 31]
  1869. DRAFT                   Point-to-Point Protocol                 May 1994
  1870.  
  1871.  
  1872.       be a proper subset of those in the last transmitted Configure-
  1873.       Request.  Invalid packets are silently discarded.
  1874.  
  1875.       Reception of a valid Configure-Reject indicates that when a new
  1876.       Configure-Request is sent, it MUST NOT include any of the
  1877.       Configuration Options listed in the Configure-Reject.
  1878.  
  1879.    A summary of the Configure-Reject packet format is shown below.  The
  1880.    fields are transmitted from left to right.
  1881.  
  1882.     0                   1                   2                   3
  1883.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1884.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1885.    |     Code      |  Identifier   |            Length             |
  1886.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1887.    | Options ...
  1888.    +-+-+-+-+
  1889.  
  1890.  
  1891.    Code
  1892.  
  1893.       4 for Configure-Reject.
  1894.  
  1895.    Identifier
  1896.  
  1897.       The Identifier field is a copy of the Identifier field of the
  1898.       Configure-Request which caused this Configure-Reject.
  1899.  
  1900.    Options
  1901.  
  1902.       The Options field is variable in length, and contains the list of
  1903.       zero or more Configuration Options that the sender is rejecting.
  1904.       All Configuration Options are always rejected simultaneously.
  1905.  
  1906.  
  1907.  
  1908.  
  1909.  
  1910.  
  1911.  
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.  
  1922.  
  1923. Simpson                  expires in six months                 [Page 32]
  1924. DRAFT                   Point-to-Point Protocol                 May 1994
  1925.  
  1926.  
  1927. 5.5.  Terminate-Request and Terminate-Ack
  1928.  
  1929.    Description
  1930.  
  1931.       LCP includes Terminate-Request and Terminate-Ack Codes in order to
  1932.       provide a mechanism for closing a connection.
  1933.  
  1934.       An implementation wishing to close a connection SHOULD transmit a
  1935.       Terminate-Request.  Terminate-Request packets SHOULD continue to
  1936.       be sent until Terminate-Ack is received, the lower layer indicates
  1937.       that it has gone down, or a sufficiently large number have been
  1938.       transmitted such that the peer is down with reasonable certainty.
  1939.  
  1940.       Upon reception of a Terminate-Request, a Terminate-Ack MUST be
  1941.       transmitted.
  1942.  
  1943.       Reception of an unelicited Terminate-Ack indicates that the peer
  1944.       is in the Closed or Stopped states, or is otherwise in need of
  1945.       re-negotiation.
  1946.  
  1947.    A summary of the Terminate-Request and Terminate-Ack packet formats
  1948.    is shown below.  The fields are transmitted from left to right.
  1949.  
  1950.     0                   1                   2                   3
  1951.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1952.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1953.    |     Code      |  Identifier   |            Length             |
  1954.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1955.    |    Data ...
  1956.    +-+-+-+-+
  1957.  
  1958.  
  1959.    Code
  1960.  
  1961.       5 for Terminate-Request;
  1962.  
  1963.       6 for Terminate-Ack.
  1964.  
  1965.    Identifier
  1966.  
  1967.       On transmission, the Identifier field MUST be changed whenever the
  1968.       content of the Data field changes, and whenever a valid reply has
  1969.       been received for a previous request.  For retransmissions, the
  1970.       Identifier MAY remain unchanged.
  1971.  
  1972.       On reception, the Identifier field of the Terminate-Request is
  1973.       copied into the Identifier field of the Terminate-Ack packet.
  1974.  
  1975.  
  1976.  
  1977.  
  1978. Simpson                  expires in six months                 [Page 33]
  1979. DRAFT                   Point-to-Point Protocol                 May 1994
  1980.  
  1981.  
  1982.    Data
  1983.  
  1984.       The Data field is zero or more octets, and contains uninterpreted
  1985.       data for use by the sender.  The data may consist of any binary
  1986.       value.  The end of the field is indicated by the Length.
  1987.  
  1988.  
  1989.  
  1990. 5.6.  Code-Reject
  1991.  
  1992.    Description
  1993.  
  1994.       Reception of a LCP packet with an unknown Code indicates that the
  1995.       peer is operating with a different version.  This MUST be reported
  1996.       back to the sender of the unknown Code by transmitting a Code-
  1997.       Reject.
  1998.  
  1999.       Upon reception of the Code-Reject of a code which is fundamental
  2000.       to this version of the protocol, the implementation SHOULD report
  2001.       the problem and drop the connection, since it is unlikely that the
  2002.       situation can be rectified automatically.
  2003.  
  2004.    A summary of the Code-Reject packet format is shown below.  The
  2005.    fields are transmitted from left to right.
  2006.  
  2007.     0                   1                   2                   3
  2008.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2009.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2010.    |     Code      |  Identifier   |            Length             |
  2011.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2012.    | Rejected-Packet ...
  2013.    +-+-+-+-+-+-+-+-+
  2014.  
  2015.  
  2016.    Code
  2017.  
  2018.       7 for Code-Reject.
  2019.  
  2020.    Identifier
  2021.  
  2022.       The Identifier field MUST be changed for each Code-Reject sent.
  2023.  
  2024.    Rejected-Packet
  2025.  
  2026.       The Rejected-Packet field contains a copy of the LCP packet which
  2027.       is being rejected.  It begins with the Information field, and does
  2028.       not include any Data Link Layer headers nor an FCS.  The
  2029.       Rejected-Packet MUST be truncated to comply with the peer's
  2030.  
  2031.  
  2032.  
  2033. Simpson                  expires in six months                 [Page 34]
  2034. DRAFT                   Point-to-Point Protocol                 May 1994
  2035.  
  2036.  
  2037.       established MRU.
  2038.  
  2039.  
  2040.  
  2041. 5.7.  Protocol-Reject
  2042.  
  2043.    Description
  2044.  
  2045.       Reception of a PPP packet with an unknown Protocol field indicates
  2046.       that the peer is attempting to use a protocol which is
  2047.       unsupported.  This usually occurs when the peer attempts to
  2048.       configure a new protocol.  If the LCP automaton is in the Opened
  2049.       state, then this MUST be reported back to the peer by transmitting
  2050.       a Protocol-Reject.
  2051.  
  2052.       Upon reception of a Protocol-Reject, the implementation MUST stop
  2053.       sending packets of the indicated protocol at the earliest
  2054.       opportunity.
  2055.  
  2056.       Protocol-Reject packets can only be sent in the LCP Opened state.
  2057.       Protocol-Reject packets received in any state other than the LCP
  2058.       Opened state SHOULD be silently discarded.
  2059.  
  2060.    A summary of the Protocol-Reject packet format is shown below.  The
  2061.    fields are transmitted from left to right.
  2062.  
  2063.     0                   1                   2                   3
  2064.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2065.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2066.    |     Code      |  Identifier   |            Length             |
  2067.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2068.    |       Rejected-Protocol       |      Rejected-Information ...
  2069.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2070.  
  2071.  
  2072.    Code
  2073.  
  2074.       8 for Protocol-Reject.
  2075.  
  2076.    Identifier
  2077.  
  2078.       The Identifier field MUST be changed for each Protocol-Reject
  2079.       sent.
  2080.  
  2081.    Rejected-Protocol
  2082.  
  2083.       The Rejected-Protocol field is two octets, and contains the PPP
  2084.       Protocol field of the packet which is being rejected.
  2085.  
  2086.  
  2087.  
  2088. Simpson                  expires in six months                 [Page 35]
  2089. DRAFT                   Point-to-Point Protocol                 May 1994
  2090.  
  2091.  
  2092.    Rejected-Information
  2093.  
  2094.       The Rejected-Information field contains a copy of the packet which
  2095.       is being rejected.  It begins with the Information field, and does
  2096.       not include any Data Link Layer headers nor an FCS.  The
  2097.       Rejected-Information MUST be truncated to comply with the peer's
  2098.       established MRU.
  2099.  
  2100.  
  2101.  
  2102. 5.8.  Echo-Request and Echo-Reply
  2103.  
  2104.    Description
  2105.  
  2106.       LCP includes Echo-Request and Echo-Reply Codes in order to provide
  2107.       a Data Link Layer loopback mechanism for use in exercising both
  2108.       directions of the link.  This is useful as an aid in debugging,
  2109.       link quality determination, performance testing, and for numerous
  2110.       other functions.
  2111.  
  2112.       Upon reception of an Echo-Request in the LCP Opened state, an
  2113.       Echo-Reply MUST be transmitted.
  2114.  
  2115.       Echo-Request and Echo-Reply packets MUST only be sent in the LCP
  2116.       Opened state.  Echo-Request and Echo-Reply packets received in any
  2117.       state other than the LCP Opened state SHOULD be silently
  2118.       discarded.
  2119.  
  2120.  
  2121.    A summary of the Echo-Request and Echo-Reply packet formats is shown
  2122.    below.  The fields are transmitted from left to right.
  2123.  
  2124.     0                   1                   2                   3
  2125.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2126.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2127.    |     Code      |  Identifier   |            Length             |
  2128.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2129.    |                         Magic-Number                          |
  2130.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2131.    |    Data ...
  2132.    +-+-+-+-+
  2133.  
  2134.  
  2135.    Code
  2136.  
  2137.       9 for Echo-Request;
  2138.  
  2139.       10 for Echo-Reply.
  2140.  
  2141.  
  2142.  
  2143. Simpson                  expires in six months                 [Page 36]
  2144. DRAFT                   Point-to-Point Protocol                 May 1994
  2145.  
  2146.  
  2147.    Identifier
  2148.  
  2149.       On transmission, the Identifier field MUST be changed whenever the
  2150.       content of the Data field changes, and whenever a valid reply has
  2151.       been received for a previous request.  For retransmissions, the
  2152.       Identifier MAY remain unchanged.
  2153.  
  2154.       On reception, the Identifier field of the Echo-Request is copied
  2155.       into the Identifier field of the Echo-Reply packet.
  2156.  
  2157.    Magic-Number
  2158.  
  2159.       The Magic-Number field is four octets, and aids in detecting links
  2160.       which are in the looped-back condition.  Until the Magic-Number
  2161.       Configuration Option has been successfully negotiated, the Magic-
  2162.       Number MUST be transmitted as zero.  See the Magic-Number
  2163.       Configuration Option for further explanation.
  2164.  
  2165.    Data
  2166.  
  2167.       The Data field is zero or more octets, and contains uninterpreted
  2168.       data for use by the sender.  The data may consist of any binary
  2169.       value.  The end of the field is indicated by the Length.
  2170.  
  2171.  
  2172.  
  2173. 5.9.  Discard-Request
  2174.  
  2175.    Description
  2176.  
  2177.       LCP includes a Discard-Request Code in order to provide a Data
  2178.       Link Layer sink mechanism for use in exercising the local to
  2179.       remote direction of the link.  This is useful as an aid in
  2180.       debugging, performance testing, and for numerous other functions.
  2181.  
  2182.       Discard-Request packets MUST only be sent in the LCP Opened state.
  2183.       On reception, the receiver MUST silently discard any Discard-
  2184.       Request that it receives.
  2185.  
  2186.    A summary of the Discard-Request packet format is shown below.  The
  2187.    fields are transmitted from left to right.
  2188.  
  2189.  
  2190.  
  2191.  
  2192.  
  2193.  
  2194.  
  2195.  
  2196.  
  2197.  
  2198. Simpson                  expires in six months                 [Page 37]
  2199. DRAFT                   Point-to-Point Protocol                 May 1994
  2200.  
  2201.  
  2202.  
  2203.     0                   1                   2                   3
  2204.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2205.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2206.    |     Code      |  Identifier   |            Length             |
  2207.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2208.    |                         Magic-Number                          |
  2209.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2210.    |    Data ...
  2211.    +-+-+-+-+
  2212.  
  2213.  
  2214.    Code
  2215.  
  2216.       11 for Discard-Request.
  2217.  
  2218.    Identifier
  2219.  
  2220.       The Identifier field MUST be changed for each Discard-Request
  2221.       sent.
  2222.  
  2223.    Magic-Number
  2224.  
  2225.       The Magic-Number field is four octets, and aids in detecting links
  2226.       which are in the looped-back condition.  Until the Magic-Number
  2227.       Configuration Option has been successfully negotiated, the Magic-
  2228.       Number MUST be transmitted as zero.  See the Magic-Number
  2229.       Configuration Option for further explanation.
  2230.  
  2231.    Data
  2232.  
  2233.       The Data field is zero or more octets, and contains uninterpreted
  2234.       data for use by the sender.  The data may consist of any binary
  2235.       value.  The end of the field is indicated by the Length.
  2236.  
  2237.  
  2238.  
  2239.  
  2240.  
  2241.  
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.  
  2252.  
  2253. Simpson                  expires in six months                 [Page 38]
  2254. DRAFT                   Point-to-Point Protocol                 May 1994
  2255.  
  2256.  
  2257. 6.  LCP Configuration Options
  2258.  
  2259.    LCP Configuration Options allow negotiation of modifications to the
  2260.    default characteristics of a point-to-point link.  If a Configuration
  2261.    Option is not included in a Configure-Request packet, the default
  2262.    value for that Configuration Option is assumed.
  2263.  
  2264.    Some Configuration Options MAY be listed more than once.  The effect
  2265.    of this is Configuration Option specific, and is specified by each
  2266.    such Configuration Option description.  (None of the Configuration
  2267.    Options in this specification can be listed more than once.)
  2268.  
  2269.    The end of the list of Configuration Options is indicated by the
  2270.    Length field of the LCP packet.
  2271.  
  2272.    Unless otherwise specified, all Configuration Options apply in a
  2273.    half-duplex fashion; typically, in the receive direction of the link
  2274.    from the point of view of the Configure-Request sender.
  2275.  
  2276.    Design Philosophy
  2277.  
  2278.       The options indicate additional capabilities or requirements of
  2279.       the implementation that is requesting the option.  An
  2280.       implementation which does not understand any option SHOULD
  2281.       interoperate with one which implements every option.
  2282.  
  2283.       A default is specified for each option which allows the link to
  2284.       correctly function without negotiation of the option, although
  2285.       perhaps with less than optimal performance.
  2286.  
  2287.       Except where explicitly specified, acknowledgement of an option
  2288.       does not require the peer to take any additional action other than
  2289.       the default.
  2290.  
  2291.       It is not necessary to send the default values for the options in
  2292.       a Configure-Request.
  2293.  
  2294.  
  2295.    A summary of the Configuration Option format is shown below.  The
  2296.    fields are transmitted from left to right.
  2297.  
  2298.     0                   1
  2299.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
  2300.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2301.    |     Type      |    Length     |    Data ...
  2302.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2303.  
  2304.  
  2305.  
  2306.  
  2307.  
  2308. Simpson                  expires in six months                 [Page 39]
  2309. DRAFT                   Point-to-Point Protocol                 May 1994
  2310.  
  2311.  
  2312.    Type
  2313.  
  2314.       The Type field is one octet, and indicates the type of
  2315.       Configuration Option.  Up-to-date values of the LCP Option Type
  2316.       field are specified in the most recent "Assigned Numbers" RFC [2].
  2317.       This document concerns the following values:
  2318.  
  2319.          0       RESERVED
  2320.          1       Maximum-Receive-Unit
  2321.          3       Authentication-Protocol
  2322.          4       Quality-Protocol
  2323.          5       Magic-Number
  2324.          7       Protocol-Field-Compression
  2325.          8       Address-and-Control-Field-Compression
  2326.  
  2327.  
  2328.    Length
  2329.  
  2330.       The Length field is one octet, and indicates the length of this
  2331.       Configuration Option including the Type, Length and Data fields.
  2332.  
  2333.       If a negotiable Configuration Option is received in a Configure-
  2334.       Request, but with an invalid or unrecognized Length, a Configure-
  2335.       Nak SHOULD be transmitted which includes the desired Configuration
  2336.       Option with an appropriate Length and Data.
  2337.  
  2338.    Data
  2339.  
  2340.       The Data field is zero or more octets, and contains information
  2341.       specific to the Configuration Option.  The format and length of
  2342.       the Data field is determined by the Type and Length fields.
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363. Simpson                  expires in six months                 [Page 40]
  2364. DRAFT                   Point-to-Point Protocol                 May 1994
  2365.  
  2366.  
  2367. 6.1.  Maximum-Receive-Unit (MRU)
  2368.  
  2369.    Description
  2370.  
  2371.       This Configuration Option may be sent to inform the peer that the
  2372.       implementation can receive larger packets, or to request that the
  2373.       peer send smaller packets.
  2374.  
  2375.       The default value is 1500 octets.  If smaller packets are
  2376.       requested, an implementation MUST still be able to receive the
  2377.       full 1500 octet information field in case link synchronization is
  2378.       lost.
  2379.  
  2380.       Implementation Note:
  2381.  
  2382.          This option is used to indicate an implementation capability.
  2383.          The peer is not required to maximize the use of the capacity.
  2384.          For example, when a MRU is indicated which is 2048 octets, the
  2385.          peer is not required to send any packet with 2048 octets.  The
  2386.          peer need not Configure-Nak to indicate that it will only send
  2387.          smaller packets, since the implementation will always require
  2388.          support for at least 1500 octets.
  2389.  
  2390.    A summary of the Maximum-Receive-Unit Configuration Option format is
  2391.    shown below.  The fields are transmitted from left to right.
  2392.  
  2393.     0                   1                   2                   3
  2394.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2395.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2396.    |     Type      |    Length     |      Maximum-Receive-Unit     |
  2397.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2398.  
  2399.  
  2400.    Type
  2401.  
  2402.       1
  2403.  
  2404.    Length
  2405.  
  2406.       4
  2407.  
  2408.    Maximum-Receive-Unit
  2409.  
  2410.       The Maximum-Receive-Unit field is two octets, and specifies the
  2411.       maximum number of octets in the Information and Padding fields.
  2412.       It does not include the framing, Protocol field, FCS, nor any
  2413.       transparency bits or bytes.
  2414.  
  2415.  
  2416.  
  2417.  
  2418. Simpson                  expires in six months                 [Page 41]
  2419. DRAFT                   Point-to-Point Protocol                 May 1994
  2420.  
  2421.  
  2422. 6.2.  Authentication-Protocol
  2423.  
  2424.    Description
  2425.  
  2426.       On some links it may be desirable to require a peer to
  2427.       authenticate itself before allowing network-layer protocol packets
  2428.       to be exchanged.
  2429.  
  2430.       This Configuration Option provides a method to negotiate the use
  2431.       of a specific protocol for authentication.  By default,
  2432.       authentication is not required.
  2433.  
  2434.       An implementation MUST NOT include multiple Authentication-
  2435.       Protocol Configuration Options in its Configure-Request packets.
  2436.       Instead, it SHOULD attempt to configure the most desirable
  2437.       protocol first.  If that protocol is Configure-Nak'd, then the
  2438.       implementation SHOULD attempt the next most desirable protocol in
  2439.       the next Configure-Request.
  2440.  
  2441.       The implementation sending the Configure-Request is indicating
  2442.       that it expects authentication from its peer.  If an
  2443.       implementation sends a Configure-Ack, then it is agreeing to
  2444.       authenticate with the specified protocol.  An implementation
  2445.       receiving a Configure-Ack SHOULD expect the peer to authenticate
  2446.       with the acknowledged protocol.
  2447.  
  2448.       There is no requirement that authentication be full-duplex or that
  2449.       the same protocol be used in both directions.  It is perfectly
  2450.       acceptable for different protocols to be used in each direction.
  2451.       This will, of course, depend on the specific protocols negotiated.
  2452.  
  2453.    A summary of the Authentication-Protocol Configuration Option format
  2454.    is shown below.  The fields are transmitted from left to right.
  2455.  
  2456.     0                   1                   2                   3
  2457.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2458.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2459.    |     Type      |    Length     |     Authentication-Protocol   |
  2460.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2461.    |    Data ...
  2462.    +-+-+-+-+
  2463.  
  2464.  
  2465.    Type
  2466.  
  2467.       3
  2468.  
  2469.  
  2470.  
  2471.  
  2472.  
  2473. Simpson                  expires in six months                 [Page 42]
  2474. DRAFT                   Point-to-Point Protocol                 May 1994
  2475.  
  2476.  
  2477.    Length
  2478.  
  2479.       >= 4
  2480.  
  2481.    Authentication-Protocol
  2482.  
  2483.       The Authentication-Protocol field is two octets, and indicates the
  2484.       authentication protocol desired.  Values for this field are always
  2485.       the same as the PPP Protocol field values for that same
  2486.       authentication protocol.
  2487.  
  2488.       Up-to-date values of the Authentication-Protocol field are
  2489.       specified in the most recent "Assigned Numbers" RFC [2].  Current
  2490.       values are assigned as follows:
  2491.  
  2492.       Value (in hex)  Protocol
  2493.  
  2494.       c023            Password Authentication Protocol
  2495.       c223            Challenge Handshake Authentication Protocol
  2496.  
  2497.  
  2498.    Data
  2499.  
  2500.       The Data field is zero or more octets, and contains additional
  2501.       data as determined by the particular protocol.
  2502.  
  2503.  
  2504.  
  2505. 6.3.  Quality-Protocol
  2506.  
  2507.    Description
  2508.  
  2509.       On some links it may be desirable to determine when, and how
  2510.       often, the link is dropping data.  This process is called link
  2511.       quality monitoring.
  2512.  
  2513.       This Configuration Option provides a method to negotiate the use
  2514.       of a specific protocol for link quality monitoring.  By default,
  2515.       link quality monitoring is disabled.
  2516.  
  2517.       The implementation sending the Configure-Request is indicating
  2518.       that it expects to receive monitoring information from its peer.
  2519.       If an implementation sends a Configure-Ack, then it is agreeing to
  2520.       send the specified protocol.  An implementation receiving a
  2521.       Configure-Ack SHOULD expect the peer to send the acknowledged
  2522.       protocol.
  2523.  
  2524.       There is no requirement that quality monitoring be full-duplex or
  2525.  
  2526.  
  2527.  
  2528. Simpson                  expires in six months                 [Page 43]
  2529. DRAFT                   Point-to-Point Protocol                 May 1994
  2530.  
  2531.  
  2532.       that the same protocol be used in both directions.  It is
  2533.       perfectly acceptable for different protocols to be used in each
  2534.       direction.  This will, of course, depend on the specific protocols
  2535.       negotiated.
  2536.  
  2537.    A summary of the Quality-Protocol Configuration Option format is
  2538.    shown below.  The fields are transmitted from left to right.
  2539.  
  2540.     0                   1                   2                   3
  2541.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2542.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2543.    |     Type      |    Length     |        Quality-Protocol       |
  2544.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2545.    |    Data ...
  2546.    +-+-+-+-+
  2547.  
  2548.  
  2549.    Type
  2550.  
  2551.       4
  2552.  
  2553.    Length
  2554.  
  2555.       >= 4
  2556.  
  2557.    Quality-Protocol
  2558.  
  2559.       The Quality-Protocol field is two octets, and indicates the link
  2560.       quality monitoring protocol desired.  Values for this field are
  2561.       always the same as the PPP Protocol field values for that same
  2562.       monitoring protocol.
  2563.  
  2564.       Up-to-date values of the Quality-Protocol field are specified in
  2565.       the most recent "Assigned Numbers" RFC [2].  Current values are
  2566.       assigned as follows:
  2567.  
  2568.       Value (in hex)  Protocol
  2569.  
  2570.       c025            Link Quality Report
  2571.  
  2572.  
  2573.    Data
  2574.  
  2575.       The Data field is zero or more octets, and contains additional
  2576.       data as determined by the particular protocol.
  2577.  
  2578.  
  2579.  
  2580.  
  2581.  
  2582.  
  2583. Simpson                  expires in six months                 [Page 44]
  2584. DRAFT                   Point-to-Point Protocol                 May 1994
  2585.  
  2586.  
  2587. 6.4.  Magic-Number
  2588.  
  2589.    Description
  2590.  
  2591.       This Configuration Option provides a method to detect looped-back
  2592.       links and other Data Link Layer anomalies.  This Configuration
  2593.       Option MAY be required by some other Configuration Options such as
  2594.       the Quality-Protocol Configuration Option.  By default, the
  2595.       Magic-Number is not negotiated, and zero is inserted where a
  2596.       Magic-Number might otherwise be used.
  2597.  
  2598.       Before this Configuration Option is requested, an implementation
  2599.       MUST choose its Magic-Number.  It is recommended that the Magic-
  2600.       Number be chosen in the most random manner possible in order to
  2601.       guarantee with very high probability that an implementation will
  2602.       arrive at a unique number.  A good way to choose a unique random
  2603.       number is to start with a unique seed.  Suggested sources of
  2604.       uniqueness include machine serial numbers, other network hardware
  2605.       addresses, time-of-day clocks, etc.  Particularly good random
  2606.       number seeds are precise measurements of the inter-arrival time of
  2607.       physical events such as packet reception on other connected
  2608.       networks, server response time, or the typing rate of a human
  2609.       user.  It is also suggested that as many sources as possible be
  2610.       used simultaneously.
  2611.  
  2612.       When a Configure-Request is received with a Magic-Number
  2613.       Configuration Option, the received Magic-Number is compared with
  2614.       the Magic-Number of the last Configure-Request sent to the peer.
  2615.       If the two Magic-Numbers are different, then the link is not
  2616.       looped-back, and the Magic-Number SHOULD be acknowledged.  If the
  2617.       two Magic-Numbers are equal, then it is possible, but not certain,
  2618.       that the link is looped-back and that this Configure-Request is
  2619.       actually the one last sent.  To determine this, a Configure-Nak
  2620.       MUST be sent specifying a different Magic-Number value.  A new
  2621.       Configure-Request SHOULD NOT be sent to the peer until normal
  2622.       processing would cause it to be sent (that is, until a Configure-
  2623.       Nak is received or the Restart timer runs out).
  2624.  
  2625.       Reception of a Configure-Nak with a Magic-Number different from
  2626.       that of the last Configure-Nak sent to the peer proves that a link
  2627.       is not looped-back, and indicates a unique Magic-Number.  If the
  2628.       Magic-Number is equal to the one sent in the last Configure-Nak,
  2629.       the possibility of a looped-back link is increased, and a new
  2630.       Magic-Number MUST be chosen.  In either case, a new Configure-
  2631.       Request SHOULD be sent with the new Magic-Number.
  2632.  
  2633.       If the link is indeed looped-back, this sequence (transmit
  2634.       Configure-Request, receive Configure-Request, transmit Configure-
  2635.  
  2636.  
  2637.  
  2638. Simpson                  expires in six months                 [Page 45]
  2639. DRAFT                   Point-to-Point Protocol                 May 1994
  2640.  
  2641.  
  2642.       Nak, receive Configure-Nak) will repeat over and over again.  If
  2643.       the link is not looped-back, this sequence might occur a few
  2644.       times, but it is extremely unlikely to occur repeatedly.  More
  2645.       likely, the Magic-Numbers chosen at either end will quickly
  2646.       diverge, terminating the sequence.  The following table shows the
  2647.       probability of collisions assuming that both ends of the link
  2648.       select Magic-Numbers with a perfectly uniform distribution:
  2649.  
  2650.          Number of Collisions        Probability
  2651.          --------------------   ---------------------
  2652.                  1              1/2**32    = 2.3 E-10
  2653.                  2              1/2**32**2 = 5.4 E-20
  2654.                  3              1/2**32**3 = 1.3 E-29
  2655.  
  2656.  
  2657.       Good sources of uniqueness or randomness are required for this
  2658.       divergence to occur.  If a good source of uniqueness cannot be
  2659.       found, it is recommended that this Configuration Option not be
  2660.       enabled; Configure-Requests with the option SHOULD NOT be
  2661.       transmitted and any Magic-Number Configuration Options which the
  2662.       peer sends SHOULD be either acknowledged or rejected.  In this
  2663.       case, looped-back links cannot be reliably detected by the
  2664.       implementation, although they may still be detectable by the peer.
  2665.  
  2666.       If an implementation does transmit a Configure-Request with a
  2667.       Magic-Number Configuration Option, then it MUST NOT respond with a
  2668.       Configure-Reject when it receives a Configure-Request with a
  2669.       Magic-Number Configuration Option.  That is, if an implementation
  2670.       desires to use Magic Numbers, then it MUST also allow its peer to
  2671.       do so.  If an implementation does receive a Configure-Reject in
  2672.       response to a Configure-Request, it can only mean that the link is
  2673.       not looped-back, and that its peer will not be using Magic-
  2674.       Numbers.  In this case, an implementation SHOULD act as if the
  2675.       negotiation had been successful (as if it had instead received a
  2676.       Configure-Ack).
  2677.  
  2678.       The Magic-Number also may be used to detect looped-back links
  2679.       during normal operation, as well as during Configuration Option
  2680.       negotiation.  All LCP Echo-Request, Echo-Reply, and Discard-
  2681.       Request packets have a Magic-Number field.  If Magic-Number has
  2682.       been successfully negotiated, an implementation MUST transmit
  2683.       these packets with the Magic-Number field set to its negotiated
  2684.       Magic-Number.
  2685.  
  2686.       The Magic-Number field of these packets SHOULD be inspected on
  2687.       reception.  All received Magic-Number fields MUST be equal to
  2688.       either zero or the peer's unique Magic-Number, depending on
  2689.       whether or not the peer negotiated a Magic-Number.
  2690.  
  2691.  
  2692.  
  2693. Simpson                  expires in six months                 [Page 46]
  2694. DRAFT                   Point-to-Point Protocol                 May 1994
  2695.  
  2696.  
  2697.       Reception of a Magic-Number field equal to the negotiated local
  2698.       Magic-Number indicates a looped-back link.  Reception of a Magic-
  2699.       Number other than the negotiated local Magic-Number, the peer's
  2700.       negotiated Magic-Number, or zero if the peer didn't negotiate one,
  2701.       indicates a link which has been (mis)configured for communications
  2702.       with a different peer.
  2703.  
  2704.       Procedures for recovery from either case are unspecified, and may
  2705.       vary from implementation to implementation.  A somewhat
  2706.       pessimistic procedure is to assume a LCP Down event.  A further
  2707.       Open event will begin the process of re-establishing the link,
  2708.       which can't complete until the looped-back condition is
  2709.       terminated, and Magic-Numbers are successfully negotiated.  A more
  2710.       optimistic procedure (in the case of a looped-back link) is to
  2711.       begin transmitting LCP Echo-Request packets until an appropriate
  2712.       Echo-Reply is received, indicating a termination of the looped-
  2713.       back condition.
  2714.  
  2715.    A summary of the Magic-Number Configuration Option format is shown
  2716.    below.  The fields are transmitted from left to right.
  2717.  
  2718.     0                   1                   2                   3
  2719.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  2720.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2721.    |     Type      |    Length     |          Magic-Number
  2722.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2723.          Magic-Number (cont)       |
  2724.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2725.  
  2726.  
  2727.    Type
  2728.  
  2729.       5
  2730.  
  2731.    Length
  2732.  
  2733.       6
  2734.  
  2735.    Magic-Number
  2736.  
  2737.       The Magic-Number field is four octets, and indicates a number
  2738.       which is very likely to be unique to one end of the link.  A
  2739.       Magic-Number of zero is illegal and MUST always be Nak'd, if it is
  2740.       not Rejected outright.
  2741.  
  2742.  
  2743.  
  2744.  
  2745.  
  2746.  
  2747.  
  2748. Simpson                  expires in six months                 [Page 47]
  2749. DRAFT                   Point-to-Point Protocol                 May 1994
  2750.  
  2751.  
  2752. 6.5.  Protocol-Field-Compression (PFC)
  2753.  
  2754.    Description
  2755.  
  2756.       This Configuration Option provides a method to negotiate the
  2757.       compression of the PPP Protocol field.  By default, all
  2758.       implementations MUST transmit packets with two octet PPP Protocol
  2759.       fields.
  2760.  
  2761.       PPP Protocol field numbers are chosen such that some values may be
  2762.       compressed into a single octet form which is clearly
  2763.       distinguishable from the two octet form.  This Configuration
  2764.       Option is sent to inform the peer that the implementation can
  2765.       receive such single octet Protocol fields.
  2766.  
  2767.       As previously mentioned, the Protocol field uses an extension
  2768.       mechanism consistent with the ISO 3309 extension mechanism for the
  2769.       Address field; the Least Significant Bit (LSB) of each octet is
  2770.       used to indicate extension of the Protocol field.  A binary "0" as
  2771.       the LSB indicates that the Protocol field continues with the
  2772.       following octet.  The presence of a binary "1" as the LSB marks
  2773.       the last octet of the Protocol field.  Notice that any number of
  2774.       "0" octets may be prepended to the field, and will still indicate
  2775.       the same value (consider the two binary representations for 3,
  2776.       00000011 and 00000000 00000011).
  2777.  
  2778.       When using low speed links, it is desirable to conserve bandwidth
  2779.       by sending as little redundant data as possible.  The Protocol-
  2780.       Field-Compression Configuration Option allows a trade-off between
  2781.       implementation simplicity and bandwidth efficiency.  If
  2782.       successfully negotiated, the ISO 3309 extension mechanism may be
  2783.       used to compress the Protocol field to one octet instead of two.
  2784.       The large majority of packets are compressible since data
  2785.       protocols are typically assigned with Protocol field values less
  2786.       than 256.
  2787.  
  2788.       Compressed Protocol fields MUST NOT be transmitted unless this
  2789.       Configuration Option has been negotiated.  When negotiated, PPP
  2790.       implementations MUST accept PPP packets with either double-octet
  2791.       or single-octet Protocol fields, and MUST NOT distinguish between
  2792.       them.
  2793.  
  2794.       The Protocol field is never compressed when sending any LCP
  2795.       packet.  This rule guarantees unambiguous recognition of LCP
  2796.       packets.
  2797.  
  2798.       When a Protocol field is compressed, the Data Link Layer FCS field
  2799.       is calculated on the compressed frame, not the original
  2800.  
  2801.  
  2802.  
  2803. Simpson                  expires in six months                 [Page 48]
  2804. DRAFT                   Point-to-Point Protocol                 May 1994
  2805.  
  2806.  
  2807.       uncompressed frame.
  2808.  
  2809.    A summary of the Protocol-Field-Compression Configuration Option
  2810.    format is shown below.  The fields are transmitted from left to
  2811.    right.
  2812.  
  2813.     0                   1
  2814.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
  2815.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2816.    |     Type      |    Length     |
  2817.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2818.  
  2819.  
  2820.    Type
  2821.  
  2822.       7
  2823.  
  2824.    Length
  2825.  
  2826.       2
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.  
  2833.  
  2834.  
  2835.  
  2836.  
  2837.  
  2838.  
  2839.  
  2840.  
  2841.  
  2842.  
  2843.  
  2844.  
  2845.  
  2846.  
  2847.  
  2848.  
  2849.  
  2850.  
  2851.  
  2852.  
  2853.  
  2854.  
  2855.  
  2856.  
  2857.  
  2858. Simpson                  expires in six months                 [Page 49]
  2859. DRAFT                   Point-to-Point Protocol                 May 1994
  2860.  
  2861.  
  2862. 6.6.  Address-and-Control-Field-Compression (ACFC)
  2863.  
  2864.    Description
  2865.  
  2866.       This Configuration Option provides a method to negotiate the
  2867.       compression of the Data Link Layer Address and Control fields.  By
  2868.       default, all implementations MUST transmit frames with Address and
  2869.       Control fields appropriate to the link framing.
  2870.  
  2871.       Since these fields usually have constant values for point-to-point
  2872.       links, they are easily compressed.  This Configuration Option is
  2873.       sent to inform the peer that the implementation can receive
  2874.       compressed Address and Control fields.
  2875.  
  2876.       If a compressed frame is received when Address-and-Control-Field-
  2877.       Compression has not been negotiated, the implementation MAY
  2878.       silently discard the frame.
  2879.  
  2880.       The Address and Control fields MUST NOT be compressed when sending
  2881.       any LCP packet.  This rule guarantees unambiguous recognition of
  2882.       LCP packets.
  2883.  
  2884.       When the Address and Control fields are compressed, the Data Link
  2885.       Layer FCS field is calculated on the compressed frame, not the
  2886.       original uncompressed frame.
  2887.  
  2888.    A summary of the Address-and-Control-Field-Compression configuration
  2889.    option format is shown below.  The fields are transmitted from left
  2890.    to right.
  2891.  
  2892.     0                   1
  2893.     0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
  2894.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2895.    |     Type      |    Length     |
  2896.    +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  2897.  
  2898.  
  2899.    Type
  2900.  
  2901.       8
  2902.  
  2903.    Length
  2904.  
  2905.       2
  2906.  
  2907.  
  2908.  
  2909.  
  2910.  
  2911.  
  2912.  
  2913. Simpson                  expires in six months                 [Page 50]
  2914. DRAFT                   Point-to-Point Protocol                 May 1994
  2915.  
  2916.  
  2917. Security Considerations
  2918.  
  2919.    Security issues are briefly discussed in sections concerning the
  2920.    Authentication Phase, the Close event, and the Authentication-
  2921.    Protocol Configuration Option.
  2922.  
  2923.  
  2924.  
  2925. References
  2926.  
  2927.    [1]   Perkins, D., "Requirements for an Internet Standard Point-to-
  2928.          Point Protocol", RFC 1547, December 1993.
  2929.  
  2930.    [2]   Reynolds, J., and Postel, J., "Assigned Numbers", STD 2, RFC
  2931.          1340, USC/Information Sciences Institute, July 1992.
  2932.  
  2933.  
  2934.  
  2935. Acknowledgments
  2936.  
  2937.    Much of the text in this document is taken from the WG Requirements,
  2938.    and RFCs 1171 & 1172, by Drew Perkins while at Carnegie Mellon
  2939.    University, and by Russ Hobby of the University of California at
  2940.    Davis.
  2941.  
  2942.    William Simpson was principally responsible for introducing
  2943.    consistent terminology and philosophy, and the re-design of the phase
  2944.    and negotiation state machines.
  2945.  
  2946.    Many people spent significant time helping to develop the Point-to-
  2947.    Point Protocol.  The complete list of people is too numerous to list,
  2948.    but the following people deserve special thanks: Rick Adams, Ken
  2949.    Adelman, Fred Baker, Mike Ballard, Craig Fox, Karl Fox, Phill Gross,
  2950.    Kory Hamzeh, former WG chair Russ Hobby, David Kaufman, former WG
  2951.    chair Steve Knowles, Mark Lewis, former WG chair Brian Lloyd, John
  2952.    LoVerso, Bill Melohn, Mike Patton, former WG chair Drew Perkins, Greg
  2953.    Satz, John Shriver, Vernon Schryver, and Asher Waldfogel.
  2954.  
  2955.    Special thanks to Morning Star Technologies for providing computing
  2956.    resources and network access support for writing this specification.
  2957.  
  2958.  
  2959.  
  2960.  
  2961.  
  2962.  
  2963.  
  2964.  
  2965.  
  2966.  
  2967.  
  2968. Simpson                  expires in six months                 [Page 51]
  2969. DRAFT                   Point-to-Point Protocol                 May 1994
  2970.  
  2971.  
  2972. Chair's Address
  2973.  
  2974.    The working group can be contacted via the current chair:
  2975.  
  2976.       Fred Baker
  2977.       Advanced Computer Communications
  2978.       315 Bollay Drive
  2979.       Santa Barbara, California  93117
  2980.  
  2981.       EMail: fbaker@acc.com
  2982.  
  2983.  
  2984.  
  2985. Editor's Address
  2986.  
  2987.    Questions about this memo can also be directed to:
  2988.  
  2989.       William Allen Simpson
  2990.       Daydreamer
  2991.       Computer Systems Consulting Services
  2992.       1384 Fontaine
  2993.       Madison Heights, Michigan  48071
  2994.  
  2995.       Bill.Simpson@um.cc.umich.edu
  2996.           bsimpson@MorningStar.com
  2997.  
  2998.  
  2999.  
  3000.  
  3001.  
  3002.  
  3003.  
  3004.  
  3005.  
  3006.  
  3007.  
  3008.  
  3009.  
  3010.  
  3011.  
  3012.  
  3013.  
  3014.  
  3015.  
  3016.  
  3017.  
  3018.  
  3019.  
  3020.  
  3021.  
  3022.  
  3023. Simpson                  expires in six months                 [Page 52]
  3024. DRAFT                   Point-to-Point Protocol                 May 1994
  3025.  
  3026.  
  3027.                            Table of Contents
  3028.  
  3029.  
  3030.      1.     Introduction ..........................................    1
  3031.         1.1       Specification of Requirements ...................    2
  3032.         1.2       Terminology .....................................    3
  3033.  
  3034.      2.     PPP Encapsulation .....................................    4
  3035.  
  3036.      3.     PPP Link Operation ....................................    6
  3037.         3.1       Overview ........................................    6
  3038.         3.2       Phase Diagram ...................................    6
  3039.         3.3       Link Dead (physical-layer not ready) ............    7
  3040.         3.4       Link Establishment Phase ........................    7
  3041.         3.5       Authentication Phase ............................    8
  3042.         3.6       Network-Layer Protocol Phase ....................    8
  3043.         3.7       Link Termination Phase ..........................    9
  3044.  
  3045.      4.     The Option Negotiation Automaton ......................   11
  3046.         4.1       State Transition Table ..........................   12
  3047.         4.2       States ..........................................   14
  3048.         4.3       Events ..........................................   16
  3049.         4.4       Actions .........................................   21
  3050.         4.5       Loop Avoidance ..................................   23
  3051.         4.6       Counters and Timers .............................   24
  3052.  
  3053.      5.     LCP Packet Formats ....................................   26
  3054.         5.1       Configure-Request ...............................   28
  3055.         5.2       Configure-Ack ...................................   29
  3056.         5.3       Configure-Nak ...................................   30
  3057.         5.4       Configure-Reject ................................   31
  3058.         5.5       Terminate-Request and Terminate-Ack .............   33
  3059.         5.6       Code-Reject .....................................   34
  3060.         5.7       Protocol-Reject .................................   35
  3061.         5.8       Echo-Request and Echo-Reply .....................   36
  3062.         5.9       Discard-Request .................................   37
  3063.  
  3064.      6.     LCP Configuration Options .............................   39
  3065.         6.1       Maximum-Receive-Unit (MRU) ......................   41
  3066.         6.2       Authentication-Protocol .........................   42
  3067.         6.3       Quality-Protocol ................................   43
  3068.         6.4       Magic-Number ....................................   45
  3069.         6.5       Protocol-Field-Compression (PFC) ................   48
  3070.         6.6       Address-and-Control-Field-Compression (ACFC)
  3071.  
  3072.      SECURITY CONSIDERATIONS ......................................   51
  3073.  
  3074.      REFERENCES ...................................................   51
  3075.  
  3076.  
  3077.  
  3078. Simpson                  expires in six months                 [Page iv]
  3079. DRAFT                   Point-to-Point Protocol                 May 1994
  3080.  
  3081.  
  3082.      ACKNOWLEDGEMENTS .............................................   51
  3083.  
  3084.      CHAIR'S ADDRESS ..............................................   52
  3085.  
  3086.      EDITOR'S ADDRESS .............................................   52
  3087.  
  3088.